feat(audit): 增加审计事件基础模块
This commit is contained in:
@@ -423,6 +423,26 @@ model AiLog {
|
||||
@@map("ai_logs")
|
||||
}
|
||||
|
||||
model AuditEvent {
|
||||
id String @default(cuid())
|
||||
actorId String? @map("actor_id")
|
||||
actorName String @default("") @map("actor_name")
|
||||
action String
|
||||
entityType String @map("entity_type")
|
||||
entityId String @map("entity_id")
|
||||
productId String? @map("product_id")
|
||||
projectId String? @map("project_id")
|
||||
versionId String? @map("version_id")
|
||||
scope Json @default("{}")
|
||||
before Json?
|
||||
after Json?
|
||||
metadata Json @default("{}")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@id([id, createdAt])
|
||||
@@map("audit_events")
|
||||
}
|
||||
|
||||
model XiaobaoRiskSummary {
|
||||
versionId String @id @map("version_id")
|
||||
riskLevel String @map("risk_level")
|
||||
|
||||
Reference in New Issue
Block a user