<?php

namespace App\Models;

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

class Administration extends Model
{
    use HasFactory;

    const MAX_SEND_CARD_PER_MONTH = 5;


    protected $table = 'administration';
    public $timestamps = false;

    protected $fillable = [
        'msnv',
        'received',
        'sender',
        'sent',
        'receiver',
        'date',
        'template_id',
    ];

    public function senderUser()
    {
        return $this->belongsTo(User::class, 'sender', 'msnv');
    }

    public function receiverUser()
    {
        return $this->belongsTo(User::class, 'receiver', 'msnv');
    }
}
