mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Start work on API audit logs
This commit is contained in:
parent
947a49761e
commit
ff648e7071
4 changed files with 146 additions and 0 deletions
25
backend/src/data/entities/ApiAuditLogEntry.ts
Normal file
25
backend/src/data/entities/ApiAuditLogEntry.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
|
||||
import { ApiUserInfo } from "./ApiUserInfo";
|
||||
import { AuditLogEventData, AuditLogEventType } from "../apiAuditLogTypes";
|
||||
|
||||
@Entity("api_audit_log")
|
||||
export class ApiAuditLogEntry<TEventType extends AuditLogEventType> {
|
||||
@Column()
|
||||
@PrimaryColumn()
|
||||
id: number;
|
||||
|
||||
@Column()
|
||||
guild_id: string;
|
||||
|
||||
@Column()
|
||||
author_id: string;
|
||||
|
||||
@Column()
|
||||
event_type: TEventType;
|
||||
|
||||
@Column("simple-json")
|
||||
event_data: AuditLogEventData[TEventType];
|
||||
|
||||
@Column()
|
||||
created_at: string;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue