<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class FeedConfig extends Model
{
    protected $fillable = ['farm_id', 'brand', 'type', 'size_mm', 'bag_weight_kg', 'is_active', 'notes'];

    protected function casts(): array
    {
        return ['is_active' => 'boolean'];
    }

    public function getDisplayNameAttribute(): string
    {
        return "{$this->brand} — {$this->type}";
    }
}
