migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class SubscriptionItem extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $hidden = [
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'amount' => 'float',
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function package(): HasOne
|
||||
{
|
||||
return $this->hasOne(Package::class, 'id', 'package_id');
|
||||
}
|
||||
|
||||
public function restaurant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Restaurant::class, 'restaurant_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user