19 lines
607 B
PHP
19 lines
607 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Concerns\UsesStringIds;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class StaffBreak extends Model
|
|
{
|
|
use UsesStringIds;
|
|
public $timestamps = false;
|
|
protected $table = 'Break';
|
|
protected $fillable = ['staffId', 'label', 'startMinutes', 'endMinutes'];
|
|
public function staff(): BelongsTo { return $this->belongsTo(StaffProfile::class, 'staffId'); }
|
|
public function days(): HasMany { return $this->hasMany(BreakDay::class, 'breakId'); }
|
|
}
|