Skip to content

Teacher model: subjects, role, priority weight (schema + onboarding) #7

@guangshinhaha

Description

@guangshinhaha

Context

Prerequisite for the Stars half of the auto-assignment algorithm. Today prisma/schema.prisma only stores teacher type (REGULAR / PERMANENT_RELIEF) — no subjects, no role, no priority. Without this, "compatibility matching" can't happen.

Scope

  • Schema additions to `Teacher`:
    • `subjects: String[]` (or normalised `TeacherSubject` join table if we want filtering)
    • `role: TeacherRole` enum — `SRE | UNTRAINED | FAJT | EO | REGULAR` (extend as schools require)
    • `priorityWeight: Int?` (manual override)
  • Onboarding wizard step: capture role + subjects when bulk-importing the teacher whitelist (CSV column or per-row UI).
  • Teacher edit page surfaces these fields.
  • aSc XML importer populates subjects where the XML provides them.

Acceptance criteria

  • Migration ships without data loss.
  • New teachers created via onboarding have role/subjects set.
  • Existing teachers default to `REGULAR` and empty subjects (admin can backfill).
  • Schema is consumed by the auto-assign algorithm ticket.

Refs

  • docs/research/competitive-gap-analysis.md §4 item 1 (prereq)
  • Westwood's role taxonomy (§2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    p0Table-stakes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions