From f839872440148a24dcad39378f18f7e50d89d3b4 Mon Sep 17 00:00:00 2001 From: snowgitea Date: Wed, 1 Jul 2026 17:55:58 +0800 Subject: [PATCH] chore: src/modules/base/entity/sys/log.ts --- src/modules/base/entity/sys/log.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/modules/base/entity/sys/log.ts diff --git a/src/modules/base/entity/sys/log.ts b/src/modules/base/entity/sys/log.ts new file mode 100644 index 0000000..fd298a5 --- /dev/null +++ b/src/modules/base/entity/sys/log.ts @@ -0,0 +1,28 @@ +import { BaseEntity, transformerJson } from '../base'; +import { Column, Index, Entity } from 'typeorm'; + +/** + * 系统日志 + */ +@Entity('base_sys_log') +export class BaseSysLogEntity extends BaseEntity { + @Index() + @Column({ comment: '用户ID', nullable: true }) + userId: number; + + @Index() + @Column({ comment: '行为' }) + action: string; + + @Index() + @Column({ comment: 'ip', nullable: true }) + ip: string; + + @Column({ + comment: '参数', + nullable: true, + type: 'json', + transformer: transformerJson, + }) + params: string; +}