SystemUser.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 integer $status 状态
  13. * @property integer $type 1管理员2代理子账号3店铺账号
  14. * @property integer $is_deleted 删除状态
  15. * @property integer $is_super
  16. * @property string $remark 备注
  17. * @property string $login_ip 登录IP
  18. * @property mixed $login_at 登录时间
  19. * @property integer $login_num
  20. * @property string $create_ip
  21. * @property mixed $updated_at 更新时间
  22. * @property mixed $create_at 创建时间
  23. */
  24. class SystemUser extends Model
  25. {
  26. /**
  27. * The connection name for the model.
  28. *
  29. * @var string|null
  30. */
  31. protected $connection = 'mysql';
  32. /**
  33. * The table associated with the model.
  34. *
  35. * @var string
  36. */
  37. protected string $table = "system_user";
  38. /**
  39. * The primary key associated with the table.
  40. *
  41. * @var string
  42. */
  43. protected string $primaryKey = "id";
  44. /**
  45. * Indicates if the model should be timestamped.
  46. *
  47. * @var bool
  48. */
  49. public bool $timestamps = false;
  50. public function account(): HasOne
  51. {
  52. return $this->hasOne("app\model\saas\SaasAgent","agent_id","agent_id");
  53. }
  54. }