SystemUser.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace app\model\system;
  3. use app\extra\basic\Model;
  4. use think\model\relation\HasOne;
  5. /**
  6. * @property integer $id (主键)
  7. * @property integer $agent_id 代理ID
  8. * @property string $username 用户名
  9. * @property string $truename 真实姓名
  10. * @property string $password 密码
  11. * @property mixed $salt 密钥串
  12. * @property string $contact_name
  13. * @property string $contact_mobile
  14. * @property integer $status 状态
  15. * @property integer $type 1管理员2代理子账号3店铺账号
  16. * @property integer $is_deleted 删除状态
  17. * @property integer $is_super
  18. * @property string $remark 备注
  19. * @property string $login_ip 登录IP
  20. * @property mixed $login_at 登录时间
  21. * @property integer $login_num
  22. * @property string $create_ip
  23. * @property mixed $updated_at 更新时间
  24. * @property mixed $create_at 创建时间
  25. */
  26. class SystemUser extends Model
  27. {
  28. /**
  29. * The connection name for the model.
  30. *
  31. * @var string|null
  32. */
  33. protected $connection = 'mysql';
  34. /**
  35. * The table associated with the model.
  36. *
  37. * @var string
  38. */
  39. protected string $table = "system_user";
  40. /**
  41. * The primary key associated with the table.
  42. *
  43. * @var string
  44. */
  45. protected string $primaryKey = "id";
  46. /**
  47. * Indicates if the model should be timestamped.
  48. *
  49. * @var bool
  50. */
  51. public bool $timestamps = false;
  52. public function account(): HasOne
  53. {
  54. return $this->hasOne("app\model\saas\SaasStore", "poi_id", "store_id");
  55. }
  56. }