commit 12.01

This commit is contained in:
Владимир
2026-01-12 14:25:15 +00:00
parent 36084ba590
commit ae5ab2554b
26 changed files with 1116 additions and 1083 deletions

View File

@@ -1,39 +1,42 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
// бронирование клиентов
class Booking extends Model {
class Booking extends Model
{
use HasFactory;
protected $table = 'bookings';
protected $fillable = [
'bookingnumber',
'booking_number',
'client_id',
'employee_id',
'service_id',
'bookingdate',
'starttime',
'endtime',
'booking_date',
'start_time',
'end_time',
'status',
'cancelledby',
'cancelreason'
'cancelled_by',
'cancel_reason'
];
// списки броней
public function service()
{
return $this->belongsTo(Services::class);
}
// Связь с клиентом
public function client()
{
return $this->belongsTo(User::class, 'client_id');
}
// Связь со сотрудником
public function employee()
{
return $this->belongsTo(User::class, 'employee_id');
}
}
// Связь с услугой
public function service()
{
return $this->belongsTo(Service::class);
}
}