From 92bcad086bdc4606efbbba4cad83c484715b0ab9 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Tue, 7 Apr 2026 23:30:03 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=20seed=20=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E5=86=99=E5=85=A5=E7=9A=84=E6=B5=8B=E8=AF=95=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- docs/context/project.md | 4 ++++ docs/dev-setup.md | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/context/project.md b/docs/context/project.md index 08175ba..e7f72df 100644 --- a/docs/context/project.md +++ b/docs/context/project.md @@ -130,6 +130,10 @@ sh scripts/dev.sh run # 3. 写入测试数据(另开终端) sh scripts/dev.sh seed H001 +# 写入后可用以下账号登录(门店编号 H001): +# admin / password123 管理员 +# operator / password123 操作员 +# test / password123 只读 # 4. 数据库管理界面(可选) # 浏览器打开 http://localhost:8888 diff --git a/docs/dev-setup.md b/docs/dev-setup.md index af3fc42..070389d 100644 --- a/docs/dev-setup.md +++ b/docs/dev-setup.md @@ -84,6 +84,15 @@ cd client && flutter pub get | `sh scripts/dev.sh reset` | 删表重建(AutoMigrate) | | `sh scripts/dev.sh clear` | 清空所有业务数据(保留表结构) | +执行完成后会打印测试账号: + +``` +门店编号: H001 +admin / password123 (管理员,可审核单据) +operator / password123 (操作员,可创建/提交单据) +test / password123 (只读,仅查看) +``` + `seed` 命令工作原理: 1. 从 `backend/config/config.yaml` 解析数据库连接信息 2. 检查 MySQL 容器(`jiu_mysql`)是否运行