migrate to gtea from bistbucket
This commit is contained in:
49
public/restaurant/Modules/Booking/app/Models/RoomBlock.php
Normal file
49
public/restaurant/Modules/Booking/app/Models/RoomBlock.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Booking\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Modules\Authentication\Models\User;
|
||||
|
||||
class RoomBlock extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'restaurant_id',
|
||||
'hotel_id',
|
||||
'room_id',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'start_time',
|
||||
'end_time',
|
||||
'block_type',
|
||||
'blocked_inventory',
|
||||
'priority',
|
||||
'reason',
|
||||
'auto_release',
|
||||
'created_by',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
public const TABLE_NAME = 'room_blocks';
|
||||
|
||||
protected $table = self::TABLE_NAME;
|
||||
|
||||
public function hotel(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Hotel::class);
|
||||
}
|
||||
|
||||
public function room(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Room::class);
|
||||
}
|
||||
|
||||
public function creator(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user