<?php

namespace App\Models;

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

class smallgroup extends Model
{
    use HasFactory;

    protected $fillable = [
        'smallGroupName',
        'villageId',
        // other fields as needed
    ];

    public function village()
    {
        return $this->belongsTo(Village::class, 'villageId');
    }

    public function members()
    {
        return $this->hasMany(Member::class, 'smallGroupId');
    }
}
