<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Gapoktan extends Model
{
    use HasFactory;

    protected $table = 'gapoktans';

    protected $fillable = [
        'nik',
        'nama',
    ];

    public function petanis()
    {
        return $this->hasOne(Petani::class, 'nik', 'nik');
    }
}