feat(p1): complete P1 foundation stage
- monorepo: pnpm workspace + go.work + pyproject.toml + commitlint/husky - infra: docker-compose (minimal + full profiles) + init-sql + prometheus - arch-scan: multi-language scanner skeleton (TS/Go/Python/Proto) - shared-proto: buf v2 + classes.proto (ClassService CRUD contract) - api-gateway: Go/Gin + JWT HS256 auth + reverse proxy + request ID - classes: NestJS golden template (error system + observability + middleware + CRUD + tests) - teacher-portal: Next.js + paper-feel UI design system - CI/CD: 4 workflows (go/ts/py/proto) - docs: migration guide + project_rules + coding-standards + git-workflow + ui-design-system + 004 + 9 module READMEs + known-issues + spec/plan migration + roadmap
This commit is contained in:
17
infra/init-sql/01-init.sql
Normal file
17
infra/init-sql/01-init.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- P1: classes 域 schema
|
||||
CREATE TABLE IF NOT EXISTS `classes` (
|
||||
`id` CHAR(36) NOT NULL,
|
||||
`name` VARCHAR(100) NOT NULL,
|
||||
`grade_id` CHAR(36) NOT NULL,
|
||||
`head_teacher_id` CHAR(36) NULL,
|
||||
`description` TEXT NULL,
|
||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_classes_grade_id` (`grade_id`),
|
||||
INDEX `idx_classes_head_teacher` (`head_teacher_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- P2 起增加 users / roles / permissions 表(IAM 服务)
|
||||
-- P3 起增加 exams / homework / grades 表(CoreEdu 服务)
|
||||
-- 各服务独立数据库或独立 schema,P1 先用同库不同表前缀
|
||||
Reference in New Issue
Block a user