Audience: Engineers. What this answers: the model, the threshold-trigger automation, and the ties to Requests and Payroll.
Source:
DisciplinaryService.cs(2,049),AdminDisciplinaryService.cs(1,126),Employee/DisciplinaryService.cs(215), theViolation*/EmployeeSuspension/*Exemptionentities (TenantDb),DisciplinaryModel.cs, plus a live pass 2026-07-20.
CompanyId-scoped)ViolationPolicy EmployeeViolationTypeId, ViolationActionId,
│ ViolationCount, HasThreshold
├──> ViolationAction (Deduction/Demotion/Redeployment/Suspension/Termination/Probation)
└──< ViolationPolicyExemption ──> Person
EmployeeViolation PersonId, TargetPersonId, EmployeeViolationTypeId,
│ EmployeeViolationSourceId (Employee/System), EmployeeViolationStatusId
└──< EmployeeViolationItem ItemType (Action/Comment/Update), ItemState, ItemStatus
EmployeeViolationTrigger ViolationActionId, Amount,
EmployeeViolationTriggerStatusId (New/Approved/Declined)
EmployeeSuspension EmployeeRequestId → Requests,
IsSuspended, SuspensionDate, IsReinstated, ReinstatementDate,
HasBeenRecovered, RecoveredInPayrollId → Payroll
PayrollExemption PayrollId, PersonId, StartDate/StopDate, Period/IntervalId
MilestoneEmailExemption PersonId
Read models: ViewEmployeeViolation(+Item, +Trigger), ViewViolationPolicy(+Exemption), ViewEmployeeSuspension, ViewPayrollExemption.
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 |
The defining mechanic (RFD-001):
ViolationPolicy.HasThreshold = true, ViolationCount = N
│
employee accumulates N violations of EmployeeViolationTypeId
│
System raises EmployeeViolationTrigger
├─ ViolationActionId = policy's action
├─ Amount = penalty (for Deduction)
└─ status = New ──▶ awaits human review (Approve/Decline)
│
on Approve → the action executes (deduction to payroll, suspension, etc.)
The corresponding violations carry Source = System. The automation proposes; a human disposes — triggers land in New, not auto-approved. Verified live: Triggers screen showed New Probation/Deduction rows.
EmployeeSuspension is the clearest cross-module entity (RFD-002):
EmployeeRequestId → a Requests record, so a suspension inherits the role-chain approval (live: "Pending HR Admin's Review (0/3)" = 0 of 3 approvers).RecoveredInPayrollId + HasBeenRecovered → the Payroll run that clawed back the unpaid period.IsSuspended / IsReinstated / SuspensionDate / ReinstatementDate track the lifecycle.| Action | Payroll effect |
|---|---|
| Deduction | EmployeeViolationTrigger.Amount becomes a payroll deduction. |
| Suspension | Recovered via RecoveredInPayrollId; the person may also get a PayrollExemption for the period. |
| Demotion / Redeployment | Change the person's grade/role (affects future pay). |
| Termination | Ends employment (exit flow). |