FeedbackModel.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace App\Models;
  3. use App\Models\User\UserModel;
  4. /**
  5. * App\Models\FeedbackModel
  6. *
  7. * @property int $id
  8. * @property int $uid uid
  9. * @property int $be_uid 举报者
  10. * @property string $title 标题
  11. * @property array $images 图片
  12. * @property string $content 内容
  13. * @property int $reply_at 回复时间
  14. * @property string $reply_content 回复内容
  15. * @property \Illuminate\Support\Carbon $created_at 创建时间
  16. * @property \Illuminate\Support\Carbon $updated_at 修改时间
  17. * @property string $device 手机设备
  18. * @property string $phone 联系方式
  19. * @property array $search 搜索
  20. * @property-read \App\Models\User\UserModel $userinfo
  21. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel newModelQuery()
  22. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel newQuery()
  23. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel query()
  24. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereBeUid($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereContent($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereCreatedAt($value)
  27. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereDevice($value)
  28. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereId($value)
  29. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereImages($value)
  30. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel wherePhone($value)
  31. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereReplyAt($value)
  32. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereReplyContent($value)
  33. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereSearch($value)
  34. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereTitle($value)
  35. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereUid($value)
  36. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FeedbackModel whereUpdatedAt($value)
  37. * @mixin \Eloquent
  38. */
  39. class FeedbackModel extends Model
  40. {
  41. protected $table = 'kdgx_fpdx_feedbacks';
  42. protected $casts = [
  43. 'images' => 'array',
  44. 'search' => 'array',
  45. ];
  46. protected $fillable = [
  47. 'uid',
  48. 'be_uid',
  49. 'title',
  50. 'content',
  51. 'images',
  52. 'reply_at',
  53. 'replay_content',
  54. 'device',
  55. 'phone',
  56. 'search'
  57. ];
  58. protected $dateFormat = 'U';
  59. public function userinfo()
  60. {
  61. return $this->belongsTo(UserModel::class, 'uid', 'uid')->select(["nickname", "headimgurl", "sex"]);
  62. }
  63. }