first commit
This commit is contained in:
38
app/Models/Subscription.php
Normal file
38
app/Models/Subscription.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user