<?php

namespace App\Models;

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

class SociResAttn extends Model
{
    use HasFactory;

    protected $table = 'soci_res_attn';
    protected $primaryKey = 'SRA_ID';
    protected $fillable = ['SR_Id', 'U_Id', 'SRU_Conf'];

    public function sociRes()
    {
        return $this->belongsTo(SociResoBook::class, 'SR_Id', 'SR_Id');
    }

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