LogoutModel.php 2.8 KB

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