PricelistFileStatusEnum::class, 'processing_current_step_percentage' => 'integer', 'available_date' => 'date', 'workflow_steps' => 'array', 'file_meta' => 'array', ]; protected static function booted() { static::creating(function ($pricelistFile) { if (empty($pricelistFile->workflow_steps)) { $pricelistFile->workflow_steps = \App\Enums\PricelistWorkflowStep::defaultSteps(); } }); } public function supplier(): BelongsTo { return $this->belongsTo(Supplier::class); } public function priceList(): BelongsTo { return $this->belongsTo(PriceList::class); } public function lines(): HasMany { return $this->hasMany(PricelistFileLine::class); } }