*/ use HasFactory; use SoftDeletes; protected $fillable = [ 'production_order_id', 'installation_date', 'installation_days', 'brigadier_id', 'note', 'created_by', 'updated_by', ]; protected function casts(): array { return [ 'production_order_id' => 'integer', 'installation_date' => 'immutable_date', 'installation_days' => 'integer', 'brigadier_id' => 'integer', 'created_by' => 'integer', 'updated_by' => 'integer', ]; } public function productionOrder(): BelongsTo { return $this->belongsTo(ProductionOrder::class); } public function brigadier(): BelongsTo { return $this->belongsTo(User::class, 'brigadier_id'); } public function schedules(): HasMany { return $this->hasMany(Schedule::class); } }