小程序登录优化
This commit is contained in:
@@ -29,9 +29,7 @@ class UserModelFactory extends Factory
|
||||
'unionid' => '',
|
||||
'phone' => '',
|
||||
'avatar' => '',
|
||||
'type' => UserModel::TYPE_PENDING,
|
||||
'store_id' => 0,
|
||||
'supplier_id' => 0,
|
||||
'status' => UserModel::STATUS_NORMAL,
|
||||
'last_login_at' => null,
|
||||
];
|
||||
@@ -43,22 +41,10 @@ class UserModelFactory extends Factory
|
||||
public function forStore(int $storeId): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'type' => UserModel::TYPE_STORE,
|
||||
'store_id' => $storeId,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 已绑定供应商的供应商用户
|
||||
*/
|
||||
public function forSupplier(int $supplierId): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'type' => UserModel::TYPE_SUPPLIER,
|
||||
'supplier_id' => $supplierId,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用账号
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user