submissions: tag AuditEventData json fields

This commit is contained in:
Quaternions 2025-04-07 18:30:35 -07:00
parent bca118634e
commit 7c900d2af7
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131

@ -10,36 +10,36 @@ type AuditEventType int32
// User clicked "Submit", "Accept" etc // User clicked "Submit", "Accept" etc
const AuditEventTypeAction AuditEventType = 0 const AuditEventTypeAction AuditEventType = 0
type AuditEventDataAction struct { type AuditEventDataAction struct {
TargetStatus uint32 TargetStatus uint32 `json:"TargetStatus"`
} }
// User wrote a comment // User wrote a comment
const AuditEventTypeComment AuditEventType = 1 const AuditEventTypeComment AuditEventType = 1
type AuditEventDataComment struct { type AuditEventDataComment struct {
Comment string Comment string `json:"Comment"`
} }
// User changed Model // User changed Model
const AuditEventTypeChangeModel AuditEventType = 2 const AuditEventTypeChangeModel AuditEventType = 2
type AuditEventDataChangeModel struct { type AuditEventDataChangeModel struct {
OldModelID uint64 OldModelID uint64 `json:"OldModelID"`
OldModelVersion uint64 OldModelVersion uint64 `json:"OldModelVersion"`
NewModelID uint64 NewModelID uint64 `json:"NewModelID"`
NewModelVersion uint64 NewModelVersion uint64 `json:"NewModelVersion"`
} }
// Validator validates model // Validator validates model
const AuditEventTypeChangeValidatedModel AuditEventType = 3 const AuditEventTypeChangeValidatedModel AuditEventType = 3
type AuditEventDataChangeValidatedModel struct { type AuditEventDataChangeValidatedModel struct {
ValidatedModelID uint64 ValidatedModelID uint64 `json:"ValidatedModelID"`
ValidatedModelVerison uint64 ValidatedModelVerison uint64 `json:"ValidatedModelVerison"`
} }
// User changed DisplayName / Creator // User changed DisplayName / Creator
const AuditEventTypeChangeDisplayName AuditEventType = 4 const AuditEventTypeChangeDisplayName AuditEventType = 4
const AuditEventTypeChangeCreator AuditEventType = 5 const AuditEventTypeChangeCreator AuditEventType = 5
type AuditEventDataChangeName struct { type AuditEventDataChangeName struct {
OldName string OldName string `json:"OldName"`
NewName string NewName string `json:"NewName"`
} }
type AuditEvent struct { type AuditEvent struct {