<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class MemberKelompokTani extends Model
{
    protected $table = 'member_kelompok_tani';
    protected $fillable = ['user_id', 'kelompok_tani_id', 'role'];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function kelompok()
    {
        return $this->belongsTo(KelompokTani::class, 'kelompok_tani_id');
    }
}
