First Commit
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class SubscriptionPlan extends Model
|
||||
{
|
||||
protected $fillable = ['name', 'description', 'price', 'currency', 'duration_days', 'token_limit', 'is_active'];
|
||||
|
||||
protected $casts = [
|
||||
'price' => 'decimal:2',
|
||||
'duration_days' => 'integer',
|
||||
'token_limit' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
|
||||
public function userSubscriptions(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserSubscription::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user