小程序用户改用门店登录

This commit is contained in:
liu
2026-08-20 13:46:04 +08:00
parent 6d9f02d831
commit c1d490134e
251 changed files with 689 additions and 2727 deletions
+12
View File
@@ -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)]);
}
/**
* 指定回款周期(天)
*/