<?php

namespace App\Models\Interlocution;

use App\Models\Model;

/**
 * App\Models\Interlocution\AnswerModel
 *
 * @property int $id
 * @property int $uid uid
 * @property int $question_id 问题ID
 * @property string $content 回答
 * @property \Illuminate\Support\Carbon $created_at 创建时间
 * @property \Illuminate\Support\Carbon $updated_at 修改时间
 * @property-read \App\Models\Interlocution\QuestionModel $question
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereContent($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereQuestionId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereUid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class AnswerModel extends Model
{
    //
    protected $table = 'kdgx_fpdx_answers';

    protected $dateFormat = 'U';

    public $fillable = ['uid', 'question_id', 'content'];

    public function question()
    {
        return $this->belongsTo(QuestionModel::class, 'question_id', 'id');
    }
}
