/
ximain1
/
tpu-backend
Обзор
Документация
Войти
/
ximain1
/
tpu-backend
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
app/Models/TrainWork.php
59 строк
2 KB
Попехин Константин Сергеевич
Полная реализация экспорта маршрутного листа
03 янв 2026, 10:52
03 янв 2026, 10:52
86e6abe
Код
Авторство
О чём код?
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; /** * @property int $id * @property int $station_id * @property string $start_time * @property string $end_time * @property int $route_sheet_id * @property int $train_weight_t * @property-read \App\Models\RouteSheet $route_sheet * @property-read \App\Models\Station $station * @method static \Database\Factories\TrainWorkFactory factory($count = null, $state = []) * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork newQuery() * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork query() * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereEndTime($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereId($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereRouteSheetId($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereStartTime($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereStationId($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereTrainWeightT($value) * @property string $duration * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereDuration($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|TrainWork whereUpdatedAt($value) * @mixin \Eloquent */ class TrainWork extends Model { /** @use HasFactory<\Database\Factories\TrainWorkFactory> */ use HasFactory; public function shoulder(): BelongsTo{ return $this->belongsTo(Shoulder::class); } public function route_sheet(): BelongsTo{ return $this->belongsTo(RouteSheet::class); } protected $fillable = [ 'date', 'shift_id', 'shoulder_id', 'start_time', 'end_time', 'duration', 'route_sheet_id', 'train_weight_t', 'tkm' ]; }