feat(audit): change audit log action to string at db level and split file/folder actions

This commit is contained in:
yiling
2026-08-01 14:49:08 +08:00
parent 6d80f06c22
commit 5ef7716c9c
19 changed files with 192 additions and 193 deletions
+3 -45
View File
@@ -848,52 +848,10 @@ model AiUsage {
@@index([teamId, userId, periodStart])
}
enum AuditAction {
team_create
team_update
team_delete
team_member_add
team_member_update
team_member_remove
project_create
project_update
project_delete
project_empty_trash
project_member_add
project_member_update
project_member_remove
asset_create
asset_update
asset_delete
asset_reparent
asset_copy
share_create
share_update
share_delete
agent_create
agent_update
agent_delete
skill_create
skill_update
skill_delete
provider_create
provider_update
provider_delete
invite_create
invite_revoke
metadata_field_create
metadata_field_update
metadata_field_delete
comment_create
comment_update
comment_delete
comment_complete
}
model AuditLog {
id String @id @default(ulid())
action AuditAction
teamId String @map("team_id")
id String @id @default(ulid())
action String
teamId String @map("team_id")
userId String? @map("user_id")
projectId String? @map("project_id")
itemId String? @map("item_id")