migrations and models

This commit is contained in:
2026-01-07 22:52:33 +00:00
parent 8d681da7a1
commit 62100c42b0
29 changed files with 2250 additions and 638 deletions

33
app/Models/Booking.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Booking extends Model
{
use HasFactory;
protected $fillable = [
'room_type_id',
'check_in',
'check_out',
'guest_name',
'guest_email',
'guest_phone',
'status',
'confirmed_at',
];
protected $casts = [
'check_in' => 'date',
'check_out' => 'date',
'confirmed_at' => 'datetime',
];
public function roomType()
{
return $this->belongsTo(RoomType::class);
}
}