<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Marriage extends Model
{
    protected $fillable = [
        'husband_id',
        'wife_id',
        'marriage_date',
    ];

    protected $casts = [
        'marriage_date' => 'date',
    ];

    public function husband()
    {
        return $this->belongsTo(User::class, 'husband_id');
    }

    public function wife()
    {
        return $this->belongsTo(User::class, 'wife_id');
    }
}
