<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserFriend extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'user_friend';
    protected $fillable = ['user_id', 'to_uid','status'];

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

    public function to_user()
    {
        return $this->belongsTo(User::class,'to_uid','id');
    }

}
