wangzhibo
2026-07-28 920cec41cedfde27f89d7c19b78e03147b926ab5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';
 
/**
 * 终端设备的上线/下线数据
 */
@Entity('t_push_device_onoff')
export class PushDeviceOnoffEntity extends BaseEntity {
  @Index()
  @Column({ comment: '设备ID' })
  deviceId: string;
 
  @Column({ comment: '通道号', type: 'int' , nullable: true,default:0 })
  channelNo: number;
 
  @Column({ comment: '消息唯一ID' })
  messageId: string;
 
  @Column({ comment: '消息时间' })
  messageTime: Date;
 
  @Column({ comment: '消息类型', dict: ['ONLINE', 'OFFLINE'], default: 'ONLINE' })
  msgType: string;
 
  @Column({ comment: '设备类型' , nullable: true })
  devType: string;
 
  @Column({ comment: '设备名称', nullable: true })
  deviceName: string;
 
  @Column({ comment: '子序列号' , nullable: true })
  subSerial: string;
 
  @Column({ comment: '源端ID', nullable: true })
  dasId: string;
 
  @Column({ comment: 'NAT的IP', nullable: true })
  natIp: string;
 
  @Column({ comment: '事件发生时间', nullable: true })
  occurTime: Date;
 
  @Column({ comment: '注册时间', nullable: true })
  regTime: Date;
}