Helpdesk Database Schema Reference
Audience
Developers, database engineers, QA, security, support and architects.
Summary
This is the sole authoritative logical inventory of 13 persisted entity sets. Each verified entity appears exactly once. Physical storage namespaces and generated provider statements are intentionally excluded.
Reference Content
| Entity | Ownership | Relationships | Tenant fields | Audit | Constraints | Indexes | Lifecycle |
|---|---|---|---|---|---|---|---|
TicketCategory | Helpdesk tenant reference | No configured inbound foreign key | TenantEntity fields | Creation/compatibility audit | Required bounded name; tenant/name unique | Tenant; tenant/name | Create/list; no update/delete API |
TicketPriority | Helpdesk tenant reference | No configured inbound foreign key | TenantEntity fields | Creation/compatibility audit | Required bounded name; string level | Tenant; tenant/name; tenant/rank | Create/list; no update/delete API |
Ticket | Canonical tenant root | Parent of three explicit cascade children; other identifiers scalar | TenantEntity fields | Lifecycle audit/timeline/outbox | Required number/title; tenant/number and positive compat uniqueness | Tenant; compatibility; number; status; requester; assignee | Create and mutate; no public delete |
TicketAssignment | Ticket child history | Required Ticket foreign key; cascade | TenantEntity fields | Assignment audit belongs to Ticket action | Optional email/note bounds | Tenant; tenant/ticket/time | Append on assignment |
TicketComment | Ticket child history | Required Ticket foreign key; cascade | TenantEntity fields | Own audit plus Ticket timeline/event | Required bounded body | Tenant; tenant/ticket/time | Append; no edit/delete API |
TicketAttachment | Ticket child metadata | Required Ticket foreign key; cascade; CommentId scalar only | TenantEntity fields | Create/delete activity | Required external references, filename, hash, uploader | Tenant; tenant/ticket/time | Create/list/download; local-reference delete |
SlaPolicy | Tenant configuration | Category/Priority identifiers scalar only | TenantEntity fields | Creation audit | Required name; converted duration/target; tenant/name unique | Tenant; tenant/name | Create/list; active flag |
TicketSla | Per-ticket SLA state | Ticket/Policy identifiers scalar only | TenantEntity fields | Breach activity stored separately | Converted target; required due state | Tenant; tenant/ticket/target; tenant/breach/due | Create; mark met/breached |
TicketEscalation | Per-ticket escalation state | Ticket/SLA identifiers scalar only | TenantEntity fields | Escalation activity stored separately | Required bounded reason; converted status | Tenant; tenant/ticket/level | Create and status fields; no cleanup |
TicketAuditLog | Audit activity | Entity identity stored as text; no foreign key | Explicit TenantId | Is the audit record | Required entity/action/actor fields; JSON details | Tenant/time | Append through helper; no retention |
TicketTimeline | Timeline activity | Entity identity stored as text; no foreign key | Explicit TenantId | Is the timeline record | Required entity/entry/actor fields; JSON metadata | Tenant/time | Append through helper; no retention |
ProcessedIntegrationEvent | Integration idempotency state | No configured relationships | No tenant field/filter | No separate activity | Required event type/outcome; EventId unique | Unique EventId | Population path not found; no retention |
OutboxMessage | Transactional publication state | No configured relationships | Tenant carried in payload, not filtered field | Processing status/error fields | Required event/payload/status/source; EventId unique | Unique EventId; status/time | Pending/Failed read; processed/failed updates |
Interpretation notes
TenantEntity contributes identifier, numeric tenant, optional tenant key, created time and updated time. Audit and timeline define tenant identity directly. Processed-event and outbox records do not inherit TenantEntity and do not have global tenant filters.
Only assignment, comment and attachment relationships are explicit database foreign keys. Other logical identity links are application-managed scalar fields.
Requires confirmation
Referential-integrity expansion, entity retention, tenant treatment of integration records, audit immutability and production schema governance require confirmation.
Source References
microservices/src/helpdesk-service/Domain/HelpdeskEntities.csmicroservices/src/helpdesk-service/Infrastructure/HelpdeskDbContext.csmicroservices/src/helpdesk-service/Infrastructure/Persistence.cs
Related Articles
See Also
Keywords
Helpdesk entity schema, persistence inventory, entity relationship, tenant storage.
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Next review: 2026-10-20