CuttingStatus::class, 'total_material_cost' => 'integer', 'sewing_cost' => 'integer', 'other_cost' => 'integer', 'cost_per_unit' => 'integer', ]; } public function createdBy(): BelongsTo { return $this->belongsTo(User::class, 'created_by_id'); } public function materials(): HasMany { return $this->hasMany(CuttingMaterial::class); } public function results(): HasMany { return $this->hasMany(CuttingResult::class); } public function resultPrices(): HasMany { return $this->hasMany(CuttingResultPrice::class); } public function createdAtFormatted(): Attribute { return Attribute::make( get: fn () => $this->created_at?->translatedFormat('l, d F Y H:i'), ); } public function statusLabel(): Attribute { return Attribute::make( get: fn () => $this->status->label(), ); } }