06112602ec
Version the NestJS TDLib gateway with Docker deployment, migrations, automated tests and platform integration documentation while excluding all account sessions, credentials, runtime databases and backups.
48 lines
820 B
TypeScript
48 lines
820 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
CreateDateColumn,
|
|
Index,
|
|
} from 'typeorm';
|
|
|
|
@Entity('tg_audit_logs')
|
|
export class TgAuditLog {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Index()
|
|
@Column()
|
|
tenantId: string;
|
|
|
|
@Column({ nullable: true })
|
|
userId: string;
|
|
|
|
@Column({ nullable: true })
|
|
accountId: string;
|
|
|
|
@Column({ length: 100 })
|
|
action: string;
|
|
|
|
@Column({ length: 100 })
|
|
resource: string;
|
|
|
|
@Column({ nullable: true })
|
|
resourceId: string;
|
|
|
|
@Column({ length: 45, nullable: true })
|
|
ipAddress: string;
|
|
|
|
@Column({ type: 'simple-json', nullable: true })
|
|
details: Record<string, unknown>;
|
|
|
|
@Column({ type: 'int', nullable: true })
|
|
statusCode: number;
|
|
|
|
@Column({ type: 'int', nullable: true })
|
|
duration: number;
|
|
|
|
@CreateDateColumn()
|
|
createdAt: Date;
|
|
}
|