feat(db): H001 改名 S001,新增 S002(空库存版)
S001: 含完整入库/出库/库存历史数据 S002: 基础数据相同(商品/供应商/仓库),入库/出库/库存均为空,模拟新门店 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -80,14 +80,14 @@ cd client && flutter pub get
|
||||
|
||||
| 命令 | 说明 |
|
||||
|------|------|
|
||||
| `sh scripts/dev.sh seed H001` | 清空并写入 H001 测试数据 |
|
||||
| `sh scripts/dev.sh seed S001` | 清空并写入 S001 测试数据 |
|
||||
| `sh scripts/dev.sh reset` | 删表重建(AutoMigrate) |
|
||||
| `sh scripts/dev.sh clear` | 清空所有业务数据(保留表结构) |
|
||||
|
||||
执行完成后会打印测试账号:
|
||||
|
||||
```
|
||||
门店编号: H001
|
||||
门店编号: S001
|
||||
admin / password123 (管理员,可审核单据)
|
||||
operator / password123 (操作员,可创建/提交单据)
|
||||
test / password123 (只读,仅查看)
|
||||
@@ -101,10 +101,10 @@ test / password123 (只读,仅查看)
|
||||
|
||||
### 新增门店测试数据
|
||||
|
||||
参照 `backend/seeds/H001.sql` 创建新文件 `backend/seeds/H002.sql`,然后执行:
|
||||
参照 `backend/seeds/S001.sql` 创建新文件 `backend/seeds/S002.sql`,然后执行:
|
||||
|
||||
```bash
|
||||
sh scripts/dev.sh seed H002
|
||||
sh scripts/dev.sh seed S002
|
||||
```
|
||||
|
||||
---
|
||||
@@ -121,7 +121,7 @@ sh scripts/dev.sh run
|
||||
# Flutter 窗口自动弹出
|
||||
|
||||
# 第三步(另开终端):写入测试数据
|
||||
sh scripts/dev.sh seed H001
|
||||
sh scripts/dev.sh seed S001
|
||||
|
||||
# 数据库管理界面(可选)
|
||||
# http://localhost:8888 服务器:mysql 用户:root 密码:password 库:jiu_db
|
||||
|
||||
Reference in New Issue
Block a user