Draft
As a system developer, I want to extend the database schema to support employer mini-program features, so that subsequent API implementations have complete data support and accurate age statistics.
Copy the acceptance criteria numbered list from the epic file
disabled_person表成功添加birth_date字段,现有记录该字段值为NULLorder_person_asset表的asset_type枚举扩展完成,新增视频类型枚举值users2表成功添加company_id字段,现有admin用户的该字段值为NULLBreak down the story into specific tasks and subtasks needed for implementation. Reference applicable acceptance criteria numbers where relevant.
birth_date field to disabled_person table (AC: 1)
allin-packages/disability-module/src/entities/disabled-person.entity.ts to add birthDate fieldbirth_date columnasset_type enum in order_person_asset table (AC: 2)
AssetType enum in allin-packages/order-module/src/schemas/order.schema.tssalary_video, tax_video, checkin_video, work_videoorder-person-asset.entity.tscompany_id field to users2 table (AC: 3)
companyId field with foreign key reference to employer_company.company_idcompany_id columnPopulate relevant information, only what was pulled from actual artifacts from docs folder, relevant to this story:
No previous stories in epic 012 (this is the first story).
Based on existing entity definitions:
DisabledPerson Entity (allin-packages/disability-module/src/entities/disabled-person.entity.ts):
id (mapped to person_id column) [Source: architecture/backend-module-package-standards.md#实体设计规范]name, gender, idCard, disabilityId, disabilityType, disabilityLevel, phone, jobStatus, etc.birth_date field (DATE type) for accurate age calculationbirthDate?: Date [Source: docs/prd/epic-012-api-supplement-for-employer-mini-program.md#故事012-01]OrderPersonAsset Entity (allin-packages/order-module/src/entities/order-person-asset.entity.ts):
id (mapped to op_id column)assetType field uses AssetType enum (varchar(50))tax, salary, job_result, contract_sign, disability_cert, other [Source: allin-packages/order-module/src/schemas/order.schema.ts]salary_video, tax_video, checkin_video, work_videoUser Entity (to be located):
users2 table needs company_id fieldemployer_company.company_id as foreign keyNot applicable for this schema-only story. Subsequent stories will implement APIs using these schema changes.
Not applicable (backend schema story).
Based on project structure [Source: architecture/source-tree.md]:
allin-packages/disability-module/src/entities/disabled-person.entity.tsallin-packages/order-module/src/entities/order-person-asset.entity.tsallin-packages/order-module/src/schemas/order.schema.tspackages/user-module or packages/auth-module)allin-packages/ for business modules [Source: architecture/source-tree.md]disabled-person.entity.ts (kebab-case) [Source: architecture/source-tree.md#集成指南]birth_date → TypeScript birthDate [Source: architecture/backend-module-package-standards.md#字段命名转换]List Relevant Testing Standards from Architecture the Developer needs to conform to:
allin-packages/{module-name}/tests/unit/**/*.test.ts [Source: architecture/testing-strategy.md#单元测试]allin-packages/{module-name}/tests/integration/**/*.test.ts [Source: architecture/testing-strategy.md#集成测试]company_id foreign key relationshipTrack changes made to this story document
| Date | Version | Description | Author |
|---|---|---|---|
| 2025-12-13 | 1.0 | Initial story creation | Bob (Scrum Master) |
This section is populated by the development agent during implementation
{{agent_model_name_version}}
Reference any debug logs or traces generated during development
Notes about the completion of tasks and any issues encountered
List all files created, modified, or affected during story implementation
Results from QA Agent QA review of the completed story implementation