LikeInviteQuestionModel.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. namespace App\Models\User;
  3. use App\Models\Model;
  4. use Illuminate\Database\Eloquent\Builder;
  5. use Illuminate\Database\Eloquent\SoftDeletes;
  6. /**
  7. * App\Models\User\LikeInviteQuestionModel
  8. *
  9. * @method static Builder withTrashed()
  10. * @property int $id
  11. * @property int $uid 用户
  12. * @property int $question_type 问题类型0:心动问答;1:接唱
  13. * @property int $thumbs 点赞数
  14. * @property int $template_id 模版id
  15. * @property int $tag_id 标签ID
  16. * @property int $sex 男声女声
  17. * @property string $author 作者
  18. * @property string $question 问题内容
  19. * @property string $voice_src 语音地址
  20. * @property \Illuminate\Support\Carbon $created_at 创建时间
  21. * @property \Illuminate\Support\Carbon $updated_at 更新时间
  22. * @property int|null $deleted_at
  23. * @property int $select 精选
  24. * @property-read \App\Models\User\UserModel $user
  25. * @method static bool|null forceDelete()
  26. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel newModelQuery()
  27. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel newQuery()
  28. * @method static \Illuminate\Database\Query\Builder|\App\Models\User\LikeInviteQuestionModel onlyTrashed()
  29. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel query()
  30. * @method static bool|null restore()
  31. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereAuthor($value)
  32. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereCreatedAt($value)
  33. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereDeletedAt($value)
  34. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereId($value)
  35. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereQuestion($value)
  36. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereQuestionType($value)
  37. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereSelect($value)
  38. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereSex($value)
  39. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereTagId($value)
  40. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereTemplateId($value)
  41. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereThumbs($value)
  42. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereUid($value)
  43. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereUpdatedAt($value)
  44. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User\LikeInviteQuestionModel whereVoiceSrc($value)
  45. * @method static \Illuminate\Database\Query\Builder|\App\Models\User\LikeInviteQuestionModel withoutTrashed()
  46. * @mixin \Eloquent
  47. */
  48. class LikeInviteQuestionModel extends Model
  49. {
  50. use SoftDeletes;
  51. protected $table = "kdgx_fpdx_likeinvite_questions";
  52. public $dateFormat = 'U';
  53. public $fillable = [
  54. 'uid',
  55. 'question',
  56. 'voice_src',
  57. 'thumbs',
  58. 'template_id',
  59. 'question_type',
  60. 'sex',
  61. 'author',
  62. 'select'
  63. ];
  64. public function user()
  65. {
  66. return $this->belongsTo(UserModel::class, 'uid', 'uid')->select('nickname', 'headimgurl');
  67. }
  68. }