generated from Tokal/Test
Fix API reliability and CORS config for hosted deployment
This commit is contained in:
@@ -8,16 +8,28 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
class ReservationFee extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'reservation_id',
|
||||
'pricing_rule_id',
|
||||
'price_per_person',
|
||||
'party_size',
|
||||
'total_fee',
|
||||
'total_amount',
|
||||
'currency',
|
||||
];
|
||||
|
||||
public function setTotalAmountAttribute($value): void
|
||||
{
|
||||
$this->attributes['total_fee'] = $value;
|
||||
}
|
||||
|
||||
public function getTotalAmountAttribute()
|
||||
{
|
||||
return $this->attributes['total_fee'] ?? null;
|
||||
}
|
||||
|
||||
public function reservation()
|
||||
{
|
||||
return $this->belongsTo(Reservation::class);
|
||||
|
||||
Reference in New Issue
Block a user