/
ghx
/
TicketFlow
Обзор
Документация
Войти
/
ghx
/
TicketFlow
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
app/Models/Session.php
37 строк
632 B
osnov
.
26 июн 2026, 11:56
26 июн 2026, 11:56
dc2de34
Код
Авторство
О чём код?
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Session extends Model { protected $table = 'showtimes'; protected $fillable = [ 'movie_id', 'hall_id', 'start_time', 'price', ]; protected $casts = [ 'start_time' => 'datetime', 'price' => 'decimal:2', ]; public function movie() { return $this->belongsTo(Movie::class); } public function hall() { return $this->belongsTo(Hall::class); } public function tickets() { return $this->hasMany(Ticket::class, 'showtime_id'); } }