<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Activity extends Model
{
    protected $fillable = ['crop_id', 'category', 'item_name', 'unit', 'quantity', 'unit_cost', 'total_cost'];

    public function crop()
    {
        return $this->belongsTo(Crop::class);
    }

    public function monthlyDistributions()
    {
        return $this->hasMany(ActivityMonthlyDistribution::class);
    }

    public function outcome()
    {
        return $this->hasOne(ActivityOutcome::class);
    }
}
