wangzhibo
6 天以前 7dcc2997614f849258091f5d66e648317a40d323
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}