<?php

namespace App\Models;

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

class Anggota extends Model
{
    use HasFactory;

    public $incrementing = false;
    protected $table = 'anggota';
    protected $keyType = 'string';

    protected $fillable = [
        'id',
        'id_registrasi',
        'nama',
        'email',
        'telepon',
        'nik'
    ];

    public function rRegistrasi() {
        return $this->belongsTo(Registrasi::class, 'id_registrasi', 'id');
    }
}
