auditLog
Audit Log — immutable event log for compliance/history
Fields
Section titled “Fields”| Field | Type | Required | Description |
|---|---|---|---|
| orgId | string | Yes | Organization ID for multi-tenant isolation |
| programId | Id<"programs"> | Yes | Parent program reference |
| entityType | string | Yes | |
| entityId | string | Yes | |
| action | ”create” | “update” | “delete” | “status_change” | Yes | |
| userId | Id<"users"> | Yes | |
| userName | string | Yes | |
| description | string | Yes | |
| metadata | any | No | |
| timestamp | number | Yes |
Indexes
Section titled “Indexes”| Name | Fields |
|---|---|
| by_program | programId |
| by_org | orgId |
| by_entity | entityType, entityId |