Data dictionary. Source: Violation* / EmployeeSuspension / *Exemption entities (TenantDb), DisciplinaryModel.cs.


Entities

Term Definition Key fields
ViolationPolicy Rule: violation type + threshold → action. EmployeeViolationTypeId, ViolationActionId, ViolationCount, HasThreshold
ViolationAction The consequence. Deduction / Demotion / Redeployment / Suspension / Termination / Probation
ViolationPolicyExemption People exempt from a policy. ViolationPolicyId, PersonId
EmployeeViolation A recorded violation. PersonId, TargetPersonId, EmployeeViolationTypeId, EmployeeViolationSourceId, EmployeeViolationStatusId
EmployeeViolationItem A timeline entry on a violation. type Action/Comment/Update, state, status
EmployeeViolationType The catalog of violation kinds.
EmployeeViolationTrigger Auto-raised action at threshold. ViolationActionId, Amount, EmployeeViolationTriggerStatusId
EmployeeSuspension A suspension. EmployeeRequestId, IsSuspended, SuspensionDate, IsReinstated, ReinstatementDate, HasBeenRecovered, RecoveredInPayrollId
PayrollExemption Exempt from a payroll run. PayrollId, PersonId, StartDate/StopDate, Period/IntervalId
MilestoneEmailExemption Opt out of milestone emails (email pref). PersonId
Views Read models ViewEmployeeViolation(+Item,+Trigger), ViewViolationPolicy(+Exemption), ViewEmployeeSuspension, ViewPayrollExemption

Enums (DisciplinaryModel.cs)

Enum Values
ViolationActionParams Deduction · Demotion · Redeployment · Suspension · Termination · Probation
EmployeeViolationSourceParams Employee · System
EmployeeViolationStatuParams New · Approved · Declined
EmployeeViolationTriggerStatuParams New · Approved · Declined
EmployeeViolationItemTypeParams Action · Comment · Update
EmployeeViolationItemStatuParams Not started · In progress · Completed
EmployeeViolationItemStateParams Upcoming · Current · Ending · Due · Other

Key concepts

Term Definition
Threshold HasThreshold • ViolationCount = N; N violations of a type auto-raise a trigger.
Trigger A system-proposed action awaiting review (New → Approved/Declined).
Source Who raised a violation — a person (Employee) or the system (System).
Target The victim of a violation (TargetPersonId), distinct from the offender (PersonId).
Recovery Clawing back an unpaid suspension in payroll (RecoveredInPayrollId, HasBeenRecovered).
Approval chain Role-chain sign-off on suspensions (via Requests), e.g. "0/3".
Exemption Freedom from a policy / a payroll run / milestone emails (three separate tables).

Services, routes, host

Component Detail
DisciplinaryService 2,049 lines
AdminDisciplinaryService 1,126
Employee/DisciplinaryService 215
Admin/DisciplinaryController 31 endpoints
DisciplinaryController / Employee/DisciplinaryController 6 / 5
Routes /dashboard/disciplinary/{policies, violation-types, violations, triggers, suspensions}
Host (live) middleware-dev.paidhr.com/admin/disciplinary/* (core-backend also has Admin/Disciplinary/*)

Cross-module

Link Via
Requests EmployeeSuspension.EmployeeRequestId — approval chain
Payroll RecoveredInPayrollId, Trigger.Amount, PayrollExemption
People PersonId (offender), TargetPersonId (victim)

Permissions

can_view_disciplinary_details (+ suspension/violation approval permissions).


Related