| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace app\model\system;
- use app\extra\basic\Model;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property integer $agent_id 代理ID
- * @property string $username 用户名
- * @property string $truename 真实姓名
- * @property string $password 密码
- * @property mixed $salt 密钥串
- * @property integer $status 状态
- * @property integer $type 1管理员2代理子账号3店铺账号
- * @property integer $is_deleted 删除状态
- * @property integer $is_super
- * @property string $remark 备注
- * @property string $login_ip 登录IP
- * @property mixed $login_at 登录时间
- * @property integer $login_num
- * @property string $create_ip
- * @property mixed $updated_at 更新时间
- * @property mixed $create_at 创建时间
- */
- class SystemUser extends Model
- {
- /**
- * The connection name for the model.
- *
- * @var string|null
- */
- protected $connection = 'mysql';
-
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected string $table = "system_user";
-
- /**
- * The primary key associated with the table.
- *
- * @var string
- */
- protected string $primaryKey = "id";
-
- /**
- * Indicates if the model should be timestamped.
- *
- * @var bool
- */
- public bool $timestamps = false;
- public function account(): HasOne
- {
- return $this->hasOne("app\model\saas\SaasAgent","agent_id","agent_id");
- }
- }
|