BlackListModel.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. namespace App\Models;
  3. use App\Models\User\UserModel;
  4. /**
  5. * App\Models\BlackListModel
  6. *
  7. * @property int $id
  8. * @property string $account_type 黑名单帐号类型
  9. * @property string $account 帐号
  10. * @property int $end_at 解封时间
  11. * @property string $type 类型
  12. * @property int $state 1=7天 2=30天 3=永久
  13. * @property int $created_at 封号时间
  14. * @property int $updated_at 修改时间
  15. * @property int $uid
  16. * @property int $complaint_id
  17. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel newModelQuery()
  18. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel newQuery()
  19. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel query()
  20. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereAccount($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereAccountType($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereComplaintId($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereCreatedAt($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereEndAt($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereId($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereState($value)
  27. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereType($value)
  28. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereUid($value)
  29. * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BlackListModel whereUpdatedAt($value)
  30. * @mixin \Eloquent
  31. */
  32. class BlackListModel extends Model
  33. {
  34. protected $table = 'fpdx_blacklists';
  35. protected $dateFormat = 'U';
  36. protected $casts = [
  37. 'created_at' => 'timestamp',
  38. 'updated_at' => 'timestamp',
  39. 'end_at' => 'timestamp',
  40. ];
  41. protected $fillable = ['uid', 'complaint_id', 'type', 'end_at', 'state', 'account_type', 'account'];
  42. public function user()
  43. {
  44. return $this->belongsTo(UserModel::class, 'uid', 'uid')
  45. ->select(
  46. 'nickname',
  47. 'headimgurl',
  48. 'sex',
  49. 'sxo',
  50. 'height',
  51. 'age',
  52. 'home',
  53. 'address',
  54. 'school',
  55. 'qq',
  56. 'weixin',
  57. 'pair_min_age',
  58. 'pair_max_age',
  59. 'wxkf'
  60. );
  61. }
  62. }