summaryrefslogtreecommitdiff
path: root/src/Models/Shifts/ScheduleShift.php
blob: 368c60b19f3030f60101120acb3f194a1606adde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php

namespace Engelsystem\Models\Shifts;

use Engelsystem\Models\BaseModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Query\Builder as QueryBuilder;

/**
 * @property int                        $shift_id
 * @property int                        $schedule_id
 * @property string                     $guid
 *
 * @property-read QueryBuilder|Schedule $schedule
 *
 * @method static QueryBuilder|ScheduleShift[] whereShiftId($value)
 * @method static QueryBuilder|ScheduleShift[] whereScheduleId($value)
 * @method static QueryBuilder|ScheduleShift[] whereGuid($value)
 */
class ScheduleShift extends BaseModel
{
    /** @var string The primary key for the model */
    protected $primaryKey = 'shift_id';

    /** @var string Required because it is not schedule_shifts */
    protected $table = 'schedule_shift';

    /** @var array Values that are mass assignable */
    protected $fillable = ['shift_id', 'schedule_id', 'guid'];

    /**
     * @return BelongsTo
     */
    public function schedule()
    {
        return $this->belongsTo(Schedule::class);
    }
}