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/RoomType.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 RoomType extends Model
{
use HasFactory;
protected $fillable = [
'hotel_id',
'name',
'capacity',
'base_price',
];
public function hotel()
{
return $this->belongsTo(Hotel::class);
}
public function bookings()
{
return $this->hasMany(Booking::class);
}
public function availabilities()
{
return $this->hasMany(RoomAvailability::class);
}
}