AnswerModel.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Models\Interlocution;
  3. use App\Models\Model;
  4. /**
  5. * App\Models\Interlocution\AnswerModel
  6. *
  7. * @property int $id
  8. * @property int $uid uid
  9. * @property int $question_id 问题ID
  10. * @property string $content 回答
  11. * @property \Illuminate\Support\Carbon $created_at 创建时间
  12. * @property \Illuminate\Support\Carbon $updated_at 修改时间
  13. * @property-read \App\Models\Interlocution\QuestionModel $question
  14. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel newModelQuery()
  15. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel newQuery()
  16. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel query()
  17. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereContent($value)
  18. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereCreatedAt($value)
  19. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereId($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereQuestionId($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereUid($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Interlocution\AnswerModel whereUpdatedAt($value)
  23. * @mixin \Eloquent
  24. */
  25. class AnswerModel extends Model
  26. {
  27. //
  28. protected $table = 'kdgx_fpdx_answers';
  29. protected $dateFormat = 'U';
  30. public $fillable = ['uid', 'question_id', 'content'];
  31. public function question()
  32. {
  33. return $this->belongsTo(QuestionModel::class, 'question_id', 'id');
  34. }
  35. }