import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 接口审计日志
 */
@Entity('t_push_auditlog')
export class PushAuditlogEntity extends BaseEntity {
  @Index()
  @Column({ comment: '日志时间', type: 'datetime', nullable: true })
  logTime: Date;

  @Index()
  @Column({ comment: '推送类型', dict: ['weight', 'health_gps','vehicle_gps','driver_anomaly','others'], default: 'weight' })
  pushType: String;

  @Index()
  @Column({ comment: '客户端ID' })
  deviceNo: string;

  @Column({ comment: '原始请求内容', type: 'text', nullable: true })
  requestContent: string;

  @Column({ comment: '错误返回信息', type: 'text', nullable: true })
  errorMessage: string;
}
