<?php

namespace App\Models;

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

class UserMessage extends Model
{
    use HasDateTimeFormatter;
    protected $table = 'user_message';
    protected $fillable = ['user_id','type', 'content','sub_id','status','do_user'];



    public function feed_like()
    {
        return $this->belongsTo(FeedLike::class,'sub_id','id');
    }

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