+ availability

This commit is contained in:
2026-01-26 09:06:06 +00:00
parent 18aad4749f
commit a448fce756
34 changed files with 1089 additions and 578 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Availability extends Model
{
use HasFactory;
protected $fillable = [
'room_type_id',
'start_date',
'end_date',
'is_available',
'price',
];
protected $casts = [
'is_available' => 'boolean',
'start_date' => 'date',
'end_date' => 'date',
'price' => 'decimal:2',
];
public function roomType()
{
return $this->belongsTo(RoomType::class);
}
}