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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
| import { BaseEntity } from '../../base/entity/base';
| import { Column, Entity, Index } from 'typeorm';
|
| /**
| * 设备告警消息(含车载ADAS/DSM/G-Sensor主动安全事件)
| */
| @Entity('t_push_device_alarm')
| export class PushDevicealarmEntity extends BaseEntity {
|
| // ========== 原有字段(不动) ==========
| @Index()
| @Column({ comment: '设备序列号' })
| devSerial: string;
|
| @Column({ comment: '通道号' })
| channelNo: string;
|
| @Column({ comment: '报警消息ID' })
| alarmId: string;
|
| @Column({ comment: '报警时间戳' })
| alarmTime: string;
|
| @Column({ comment: '报警类型' })
| alarmType: string;
|
| @Column({ comment: '通道名称' })
| channelName: string;
|
| @Column({ comment: '通道类型', dict: ['视频通道', 'IO通道'], default: 0 })
| channelType: number;
|
| @Column({ comment: '加密密码', nullable: true })
| checksum: string;
|
| @Column({ comment: '图片加密类型', dict: ['不加密', '用户加密', '平台加密'], default: 0 })
| crypt: number;
|
| @Column({ comment: '自定义信息', nullable: true })
| customInfo: string;
|
| @Column({ comment: '自定义协议类型', nullable: true })
| customType: string;
|
| @Column({ comment: '告警描述', nullable: true })
| describe: string;
|
| @Column({ comment: '位置信息', nullable: true })
| location: string;
|
| @Column({ comment: '关联ID', nullable: true })
| relationId: string;
|
| @Column({ comment: '报警状态', dict: ['开始', '停止'], default: 0 })
| status: number;
|
| @Column({ comment: '告警图片列表', type: 'json', nullable: true })
| pictureList: Array<{ url: string; id: string }>;
|
| // ========== 新增字段(车载主动安全) ==========
|
| @Index()
| @Column({
| comment: '算法大类',
| dict: ['ADAS', 'DSM', 'GSensor', 'UNKNOWN'],
| default: 'UNKNOWN',
| })
| algorithmType: string;
|
| @Column({
| comment: '报警等级 0=未知 1=一级 2=二级 3=三级',
| default: 0,
| })
| alarmLevel: number;
|
| @Column({
| comment: '算法置信度 0-100',
| default: 0,
| })
| confidence: number;
|
| @Column({
| comment: '事件状态 0=开始 1=停止(苏标开始/结束)',
| default: 0,
| })
| eventState: number;
|
| @Column({
| comment: '触发位置-经度',
| type: 'decimal',
| precision: 10,
| scale: 6,
| default: 0,
| })
| longitude: number;
|
| @Column({
| comment: '触发位置-纬度',
| type: 'decimal',
| precision: 10,
| scale: 6,
| default: 0,
| })
| latitude: number;
|
| @Column({
| comment: '触发时车速 km/h',
| type: 'decimal',
| precision: 5,
| scale: 2,
| default: 0,
| })
| speedAtEvent: number;
|
| @Column({
| comment: '触发时方向角 0-359',
| type: 'int',
| default: 0,
| })
| direction: number;
| }
|
|