Audit
Audit data model
Primary audit record. It stores lifecycle status, site details, editable assumptions, denormalized latest calculation totals, optional CRM links, and creator/updater references.
Use this when you need detailed reference information for Audit.
Models
Audit
Primary audit record. It stores lifecycle status, site details, editable assumptions, denormalized latest calculation totals, optional CRM links, and creator/updater references.
Optional CRM links:
companyIdcontactIdleadIdopportunityId
AuditLoadItem
Captures one electrical load. Inputs include name, category, location, quantity, watts per unit, runtime hours, day runtime, night runtime, surge factor, critical status, inverter-load status, and notes.
It also stores reproducible calculated values:
- total watts
- daily energy Wh
- day energy Wh
- night energy Wh
- estimated surge watts
AuditFinding
Stores system-generated warnings and manual findings. Findings can be resolved by users with audits.manage.
Finding types:
- Missing Information
- Engineering Risk
- Oversizing Warning
- Undersizing Warning
- Customer Clarification
- Site Constraint
- Commercial Note
Severity:
- Low
- Medium
- High
- Critical
AuditCalculationSnapshot
Stores the assumptions, load items, totals, and generated findings used for each calculation refresh. Snapshots make calculation history reproducible without adding quote or BOQ logic.
Deletion behavior
Audit load items, findings, and calculation snapshots cascade when the parent audit is removed. CRM links are set to null if the CRM record is removed.
Developer Details
- Source
- apps/docs/content/audit/data-model.md
- Owner
- Module Owner
- Status
- Current
- Module
- Audit
- Related route
- /audits