Code Coverage  | 
      ||||||||||
Lines  | 
       Functions and Methods  | 
       Classes and Traits  | 
      ||||||||
| Total |         | 
       100.00%  | 
       4 / 4  | 
               | 
       100.00%  | 
       4 / 4  | 
       CRAP |         | 
       100.00%  | 
       1 / 1  | 
      
| NeededAngelType |         | 
       100.00%  | 
       4 / 4  | 
               | 
       100.00%  | 
       4 / 4  | 
       4 |         | 
       100.00%  | 
       1 / 1  | 
      
| location |         | 
       100.00%  | 
       1 / 1  | 
               | 
       100.00%  | 
       1 / 1  | 
       1 | |||
| shift |         | 
       100.00%  | 
       1 / 1  | 
               | 
       100.00%  | 
       1 / 1  | 
       1 | |||
| shiftType |         | 
       100.00%  | 
       1 / 1  | 
               | 
       100.00%  | 
       1 / 1  | 
       1 | |||
| angelType |         | 
       100.00%  | 
       1 / 1  | 
               | 
       100.00%  | 
       1 / 1  | 
       1 | |||
| 1 | <?php | 
| 2 | |
| 3 | declare(strict_types=1); | 
| 4 | |
| 5 | namespace Engelsystem\Models\Shifts; | 
| 6 | |
| 7 | use Engelsystem\Models\AngelType; | 
| 8 | use Engelsystem\Models\BaseModel; | 
| 9 | use Engelsystem\Models\Location; | 
| 10 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 
| 11 | use Illuminate\Database\Eloquent\Relations\BelongsTo; | 
| 12 | use Illuminate\Database\Query\Builder as QueryBuilder; | 
| 13 | |
| 14 | /** | 
| 15 | * @property int $id | 
| 16 | * @property int|null $location_id | 
| 17 | * @property int|null $shift_id | 
| 18 | * @property int|null $shift_type_id | 
| 19 | * @property int $angel_type_id | 
| 20 | * @property int $count | 
| 21 | * | 
| 22 | * @property-read Location|null $location | 
| 23 | * @property-read Shift|null $shift | 
| 24 | * @property-read ShiftType|null $shiftType | 
| 25 | * @property-read AngelType $angelType | 
| 26 | * | 
| 27 | * @method static QueryBuilder|NeededAngelType[] whereId($value) | 
| 28 | * @method static QueryBuilder|NeededAngelType[] whereLocationId($value) | 
| 29 | * @method static QueryBuilder|NeededAngelType[] whereShiftId($value) | 
| 30 | * @method static QueryBuilder|NeededAngelType[] whereShiftTypeId($value) | 
| 31 | * @method static QueryBuilder|NeededAngelType[] whereAngelTypeId($value) | 
| 32 | * @method static QueryBuilder|NeededAngelType[] whereCount($value) | 
| 33 | */ | 
| 34 | class NeededAngelType extends BaseModel | 
| 35 | { | 
| 36 | use HasFactory; | 
| 37 | |
| 38 | /** @var array<string, null> default attributes */ | 
| 39 | protected $attributes = [ // phpcs:ignore | 
| 40 | 'location_id' => null, | 
| 41 | 'shift_id' => null, | 
| 42 | 'shift_type_id' => null, | 
| 43 | ]; | 
| 44 | |
| 45 | /** @var array<string> */ | 
| 46 | protected $fillable = [ // phpcs:ignore | 
| 47 | 'location_id', | 
| 48 | 'shift_id', | 
| 49 | 'shift_type_id', | 
| 50 | 'angel_type_id', | 
| 51 | 'count', | 
| 52 | ]; | 
| 53 | |
| 54 | /** @var array<string, string> */ | 
| 55 | protected $casts = [ // phpcs:ignore | 
| 56 | 'location_id' => 'integer', | 
| 57 | 'shift_id' => 'integer', | 
| 58 | 'shift_type_id' => 'integer', | 
| 59 | 'angel_type_id' => 'integer', | 
| 60 | 'count' => 'integer', | 
| 61 | ]; | 
| 62 | |
| 63 | public function location(): BelongsTo | 
| 64 | { | 
| 65 | return $this->belongsTo(Location::class); | 
| 66 | } | 
| 67 | |
| 68 | public function shift(): BelongsTo | 
| 69 | { | 
| 70 | return $this->belongsTo(Shift::class); | 
| 71 | } | 
| 72 | |
| 73 | public function shiftType(): BelongsTo | 
| 74 | { | 
| 75 | return $this->belongsTo(ShiftType::class); | 
| 76 | } | 
| 77 | |
| 78 | public function angelType(): BelongsTo | 
| 79 | { | 
| 80 | return $this->belongsTo(AngelType::class); | 
| 81 | } | 
| 82 | } |