<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CommentInfoModel extends Model
{
    protected $table = 'comments_info';
    protected $fillable = [
        'dream_id',
        'user_id',
        'level',
        'content',
    ];

    public function CommentUser()
    {
        return $this->belongsTo('App\Models\UserInfoModel','user_id','id');
    }

    public function dream()
    {
        return $this->hasOne('App\Models\DreamInfoModel','id','dream_id');
    }
}
