T3-W02 Identity Contract¶
Canonical student¶
op.student is the CANONICAL business student.
- One intended business student ↔ one
op.studentrow per school unit (company_id). res.partneris IDENTITY_PROJECTION (contact/name/address).res.usersis AUTH_ACCOUNT, not required to complete Core onboarding.
Identifier rules (actual)¶
| Field | Required | Uniqueness | Sensitive |
|---|---|---|---|
nsn (NISN) |
optional | company-unique | yes |
nid (NIK) |
optional | company-unique | yes |
sic |
optional (may be auto-generated) | company-unique | medium |
| email / mobile | optional | not SQL-unique on student | yes |
Empty string / - placeholders must normalize to NULL to avoid unique collisions (student.py create prep).
Duplicate / retry¶
- Re-submitting the same NISN/NIK/SIC within a company must not create a second
op.student. - Import / manual create share the same uniqueness constraints.
- Exact idempotent “reuse existing student” vs “reject duplicate” behavior is enforced by DB unique + import validation; Product default for Core W02: reject duplicate identifiers (no silent second student).
ID relations¶
op.student.id --1:1--> res.partner (student.partner_id)
op.student.user_id --0..1--> res.users
op.parent.name --M2O--> res.partner
op.parent.student_ids --M2M--> op.student
op.student.course --M2O student + M2O batch--> enrollment