From cc58d06723c0b3d5fcd6512059654ce2614b3a9b Mon Sep 17 00:00:00 2001 From: Chris Chen Date: Fri, 29 May 2026 18:10:42 -0700 Subject: [PATCH] =?UTF-8?q?docs(expense):=20correct=20subcategory=20seed?= =?UTF-8?q?=20count=20to=2039=20(matches=20DB=5FSCHEMA=20=C2=A78)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/superpowers/plans/2026-05-29-expense-tracking.md | 4 ++-- docs/superpowers/specs/2026-05-29-expense-tracking-design.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/superpowers/plans/2026-05-29-expense-tracking.md b/docs/superpowers/plans/2026-05-29-expense-tracking.md index 59cb274..791b80d 100644 --- a/docs/superpowers/plans/2026-05-29-expense-tracking.md +++ b/docs/superpowers/plans/2026-05-29-expense-tracking.md @@ -347,7 +347,7 @@ Add config at the end of `OnModelCreating`: - [ ] **Step 4: Add the category seed to DbSeeder** -In `DbSeeder.cs` add the seed data (11 groups + 38 subs from DB_SCHEMA §8): +In `DbSeeder.cs` add the seed data (11 groups + 39 subs from DB_SCHEMA §8): ```csharp // (GroupEn, GroupZh, Sort, SubItems[(SubEn, SubZh)]) private static readonly (string En, string Zh, int Sort, (string En, string Zh)[] Subs)[] ExpenseCategorySeed = @@ -2951,7 +2951,7 @@ Expected: all tests PASS (Ministry, ExpenseCategory, Expense, MonthlyStatement, - [ ] **Step 2: Start the API and confirm migrations + seed** -Start the API (per `project_build_run_env`). Confirm on startup: migration `AddExpenseModule` applies, and the DB has 10 ministries, 11 expense groups, 38 subcategories. Check via Swagger `GET /api/ministries` and `GET /api/expense-categories?includeInactive=true` (authorize with the seeded admin `admin@rolac.org / Admin1234!`). +Start the API (per `project_build_run_env`). Confirm on startup: migration `AddExpenseModule` applies, and the DB has 10 ministries, 11 expense groups, 39 subcategories. Check via Swagger `GET /api/ministries` and `GET /api/expense-categories?includeInactive=true` (authorize with the seeded admin `admin@rolac.org / Admin1234!`). - [ ] **Step 3: Verify the finance happy path via Swagger or UI** diff --git a/docs/superpowers/specs/2026-05-29-expense-tracking-design.md b/docs/superpowers/specs/2026-05-29-expense-tracking-design.md index 1dc653b..feab705 100644 --- a/docs/superpowers/specs/2026-05-29-expense-tracking-design.md +++ b/docs/superpowers/specs/2026-05-29-expense-tracking-design.md @@ -12,7 +12,7 @@ 本 spec 規劃**支出追蹤 & 報銷**模組,涵蓋 PLANNING 勾選清單全部五項: -1. **支出類別設定** — `ExpenseCategoryGroup`(11 大類)+ `ExpenseSubCategory`(~38 子項)CRUD + 種子 +1. **支出類別設定** — `ExpenseCategoryGroup`(11 大類)+ `ExpenseSubCategory`(39 子項)CRUD + 種子 2. **廠商直接付款記錄** — `Expense`(`Type=VendorPayment`),含支票號碼,建立即 `Paid` 3. **同工代墊報銷申請** — `Expense`(`Type=StaffReimbursement`),含收據照片上傳 + **同工自助提交** 4. **財務審核流程** — 狀態機 `Draft → PendingApproval → Approved → Paid`(或 `Rejected`) @@ -132,7 +132,7 @@ ### 3.6 Seed(`DbSeeder.SeedExpenseCategoriesAsync`) -沿用既有 code-based 風格(非 `HasData`),依 DB_SCHEMA §8 完整清單植入 **11 大類 + 38 子項**: +沿用既有 code-based 風格(非 `HasData`),依 DB_SCHEMA §8 完整清單植入 **11 大類 + 39 子項**: ``` 1 Equipment 設備: Purchase 購置 · Rental 租借 · Maintenance & Repair 維修