小程序用户改用门店登录
This commit is contained in:
@@ -23,6 +23,10 @@ class StoreModelFactory extends Factory
|
||||
return [
|
||||
'name' => '测试门店' . $seq,
|
||||
'code' => 'S' . str_pad((string) $seq, 6, '0', STR_PAD_LEFT),
|
||||
'username' => 'store' . $seq,
|
||||
'password' => password_hash('123456', PASSWORD_DEFAULT),
|
||||
'avatar' => '',
|
||||
'last_login_at' => null,
|
||||
'level_id' => 0,
|
||||
'contact' => '联系人' . $seq,
|
||||
'phone' => '138' . str_pad((string) $seq, 8, '0', STR_PAD_LEFT),
|
||||
@@ -41,6 +45,14 @@ class StoreModelFactory extends Factory
|
||||
return $this->state(fn () => ['status' => StoreModel::STATUS_DISABLED]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定登录密码(明文,入库自动哈希)
|
||||
*/
|
||||
public function withPassword(string $password): static
|
||||
{
|
||||
return $this->state(fn () => ['password' => password_hash($password, PASSWORD_DEFAULT)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定回款周期(天)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user