migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
|
||||
class LoyaltyRedemption extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'restaurant_id',
|
||||
'user_id',
|
||||
'food_item_id',
|
||||
'points_used',
|
||||
'price',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
public const TABLE_NAME = 'loyalty_redemptions';
|
||||
|
||||
protected $table = self::TABLE_NAME;
|
||||
|
||||
public function user(): MorphTo
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
public function foodItem(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(FoodItem::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user