feat - working audit logs for create, update delete team

This commit is contained in:
Ishaan Jaff 2024-06-05 17:50:27 -07:00
parent 970c3dfdc7
commit 5bd658493f
6 changed files with 128 additions and 32 deletions

View file

@ -246,13 +246,13 @@ model LiteLLM_InvitationLink {
}
model AuditLog {
id Int @id @default(autoincrement())
model LiteLLM_AuditLog {
id String @id @default(uuid())
updated_at DateTime @default(now())
changed_by String // user or system that performed the action
action String // create, update, delete
object_type String // team, key, user, model
table_name String // on of LitellmTableNames.TEAM_TABLE_NAME, LitellmTableNames.USER_TABLE_NAME, LitellmTableNames.PROXY_MODEL_TABLE_NAME,
object_id String // id of the object being audited. This can be the key id, team id, user id, model id
before_value Json? // value of the row
after_value Json? // value of the row after change
updated_values Json? // value of the row after change
}