*/ use HasFactory; protected $primaryKey = 'treatment_id'; protected $fillable = [ 'row_id', 'note', ]; /** * Get the vineyard row that has this treatment. */ public function vineyardRow(): BelongsTo { return $this->belongsTo(VineyardRow::class, 'row_id'); } /** * Get the planned task associated with this treatment. */ public function plannedTask(): MorphOne { return $this->morphOne(PlannedTask::class, 'taskable'); } }