<?php

namespace App\Models;

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

class FeedComment extends Model
{
    use HasDateTimeFormatter;
    protected $table = 'feed_comment';
    protected $fillable = ['feed_id', 'user_id','content','pid','to_uid'];

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

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

    public function feed()
    {
        return $this->belongsTo(Feed::class,'feed_id','id');
    }
}
