<?php

namespace App\Modules\Pilkades\Models;

use App\Core\Concerns\HasUuid;
use App\Models\User;
use App\Modules\Pilkades\Models\Concerns\BelongsToDesa;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class Admin extends Model
{
    use BelongsToDesa, HasUuid, SoftDeletes;

    protected $table = 'admins';

    protected $fillable = [
        'user_id',
        'desa_id',
        'jabatan',
        'phone',
    ];

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