Commit Graph

10 Commits

Author SHA1 Message Date
weli eca14626ec feat: add public course packages API for unauth storefront
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 08:08:00 +08:00
weli 8afd3d9234 feat(course-package): add publish/unpublish with snapshot locking
- Add published_snapshot (jsonb) and published_at (timestamp) columns
- New POST publish/{id} endpoint: stores snapshot JSON, locks editing
- New POST unpublish/{id} endpoint: clears published_at for editing
- Block update and sync_items when published_at is set
- Frontend detail page with conditional edit/publish/unpublish buttons

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 21:04:14 +08:00
weli db08280f6e feat(course-package): add org_visible to course_group and course_package_item table
Migrations:
- htyws: add org_id, org_visible columns to course_group
- htykc: create course_package_item table

Backend:
- CourseGroup: add org_visible, org_id fields; find_org_visible_by_org_id query
- CoursePackageItem: new model with sync/list API
- SUPERVISOR role check for package item management
- New endpoint: GET /api/v1/ws/find_org_visible_course_groups
- New endpoints: POST /api/v1/clazz/course-package/item/sync,
  GET /api/v1/clazz/course-package/item/list/{package_id}

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 14:26:27 +08:00
weli 542fb2461a feat(htykc): add course_package CRUD with pagination and org scoping
Introduce course_package table and API for selling course templates.
Supports teacher-owned and org-wide active package queries with keyword
search, sort order, and pagination.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 08:15:12 +08:00
weli c5134c9356 feat(org): enforce tenant isolation in ws/kc with leave and stats APIs
Add org_id schema migrations and service-level filtering for teacher-student and class workflows, then cover org-context behavior with focused unit/e2e tests for leave and hour statistics.

Made-with: Cursor
2026-04-27 20:12:02 +08:00
weli 0e53c9f66d feat(htykc): clazz completed_at migration; logrotate for htykc/htyproc/htyts
Portable run_rotate; moicen_start_huiwings_stack and ws_clazz updates; schema/models sync.

Made-with: Cursor
2026-04-26 17:14:44 +08:00
weli 2d7a46a927 feat: add huike_push_info for PushInfo extra accessors; update notifications
Made-with: Cursor
2026-04-24 09:17:32 +08:00
weli bcd2c50729 feat(htykc): clazz 命名迁移、消课点名与 Diesel 迁移
将课程相关表与 API 从 kecheng 迁至 clazz;新增消课/点名迁移;htyws 路由同步;工作区依赖 patch AuthCore。

Made-with: Cursor
2026-04-24 07:43:05 +08:00
weli 44c320d8fa chore add core rust project files and diesel migrations
Track required workspace crates, scripts, and historical diesel migrations so the repository contains the complete runnable backend baseline.

Made-with: Cursor
2026-04-23 17:20:01 +08:00
weli c843fecbce refactor teaching domain naming to course/course_section/course_group
Add diesel migrations and synchronize backend/frontend model fields plus jsonb key migration to support generic teaching subjects beyond piano-specific naming.

Made-with: Cursor
2026-04-23 17:16:10 +08:00