123456789101112131415161718 |
- import { Column, Entity } from 'typeorm';
- import * as dayjs from 'dayjs';
- import { BaseModel } from '../frame/BaseModel';
- @Entity('searchBehavior', { comment: '检索行为日志' })
- export class SearchBehavior extends BaseModel {
- @Column({ type: 'integer', nullable: true, comment: '操作人id' })
- operator_id: number;
- @Column({ type: 'character varying', nullable: true, comment: '操作人名称' })
- operator_name: string;
- @Column({ type: 'character varying', nullable: true, comment: 'ip' })
- ip: string;
- @Column({ type: 'character varying', nullable: true, comment: '设备' })
- device: string;
- @Column({ type: 'timestamp without time zone', nullable: true, comment: '时间', transformer: { from: value => (value ? dayjs(value).format('YYYY-MM-DD HH:mm:ss') : value), to: value => value } })
- time: Date;
- @Column({ type: 'character varying', comment: '检索内容' })
- keyword: string;
- }
|