feat(center): add audit logs for auth and node operations
This commit is contained in:
25
Fabric.Backend.Center/src/entities/audit-log.entity.ts
Normal file
25
Fabric.Backend.Center/src/entities/audit-log.entity.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@Entity('audit_logs')
|
||||
export class AuditLog {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
action!: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
actorId!: string | null;
|
||||
|
||||
@Column({ nullable: true })
|
||||
targetType!: string | null;
|
||||
|
||||
@Column({ nullable: true })
|
||||
targetId!: string | null;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
detail!: string | null;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user