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
This commit is contained in:
2026-04-27 20:12:02 +08:00
parent a15b5dbf58
commit c5134c9356
19 changed files with 1226 additions and 87 deletions
@@ -0,0 +1,4 @@
drop index if exists idx_teacher_student_org_id;
alter table teacher_student
drop column if exists org_id;
@@ -0,0 +1,5 @@
alter table teacher_student
add column org_id varchar;
create index idx_teacher_student_org_id
on teacher_student (org_id);