<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Subscription extends Model
{
    use HasFactory;
    
    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'service_type',
        'name_english',
        'name_chinese',
        'period_english',
        'period_chinese',
        'description_english',
        'description_chinese',
        'price',
        'status',
    ];

    public function basicServices()
    {
        return $this->hasMany(SubscriptionBasicService::class);
    }

    public function optionalServices()
    {
        return $this->hasMany(SubscriptionOptionalService::class);
    }
}
