18034727885
2026-04-14 370014cbb9ec1ef64e7e42bb4f9a12671461d8e4
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
package com.xw.yunwei.model
 
import com.google.gson.annotations.SerializedName
 
data class NoticeModel(
    /**
     * 记录创建人,前端忽略
     */
    @SerializedName("createBy")
    val createBy: String? = null,
 
    /**
     * 记录创建时间,前端忽略
     */
    @SerializedName("createTime")
    val createTime: String? = null,
 
    /**
     * 数据id,根据通知类型区分具体业务数据
     */
    @SerializedName("dataId")
    val dataId: Long? = null,
 
    /**
     * 是否删除
     * false=未删除(0) true=已删除(1)
     */
    @SerializedName("deleted")
    val deleted: Boolean? = null,
 
    /**
     * 自增id,通知记录唯一标识
     */
    @SerializedName("id")
    val id: Long? = null,
 
    /**
     * 通知内容
     */
    @SerializedName("notificationContent")
    val notificationContent: String? = null,
 
    /**
     * 通知类型
     * 1=新增事故,2=事故即将超时提示,3=事故超时提示,4=排班信息变动,
     * 5=事故状态变更,6=新增任务,7=任务过期提示,8=版本更新提示,
     * 9=变更协议政策内容,10=变更协议内容并需用户授权,11=打卡成功通知
     * 12=强制升级
     */
    @SerializedName("notificationType")
    val notificationType: Int? = null,
 
    /**
     * 消息拓展字段
     */
    @SerializedName("notificationExt")
    val notificationExt: String? = null,
 
    /**
     * 是否已读 0-未读 1-已读
     */
    @SerializedName("readStatus")
    var readStatus: Int? = null,
 
    /**
     * 通知人员id,接收该通知的用户ID
     */
    @SerializedName("operationsUserId")
    val operationsUserId: Long? = null,
 
    /**
     * 记录修改人,前端忽略
     */
    @SerializedName("updateBy")
    val updateBy: String? = null,
 
    /**
     * 记录修改时间,前端忽略
     */
    @SerializedName("updateTime")
    val updateTime: String? = null
) {
 
    /**
     * 通知类型枚举
     * 对应 notificationType 字段的所有可能值
     */
    enum class NotificationType(val value: Int, val description: String) {
        /** 1=车辆事故告警 */
        NEW_ACCIDENT(1, "车辆事故告警"),
 
        /** 2=事故即将超时提示 */
        ACCIDENT_SOON_TIMEOUT(2, "事故即将超时提示"),
 
        /** 3=事故超时提示 */
        ACCIDENT_TIMEOUT(3, "事故超时警示"),
 
        /** 4=排班信息变动 */
        SCHEDULE_CHANGE(4, "排班变更提示"),
 
        /** 5=任务状态变更 */
        ACCIDENT_STATUS_CHANGE(5, "任务状态变更"),
 
        /** 6=新增任务 */
        NEW_TASK(6, "待完成日常任务提示"),
 
        /** 7=任务过期提示 */
        TASK_EXPIRED(7, "日常任务过期提示"),
 
        /** 8=版本更新提示 */
        VERSION_UPDATE(8, "APP版本更新提示"),
 
        /** 9=变更协议政策内容 */
        POLICY_CHANGE(9, "协议政策内容更新提示"),
 
        /** 10=变更协议内容并需用户授权 */
        POLICY_CHANGE_NEED_AUTH(10, "协议政策内容更新授权"),
 
        /** 11=打卡成功通知 */
        CLOCK_IN_SUCCESS(11, "打卡成功通知"),
 
        /** 12=强制升级 */
        FORCE_UPGRADE(12, "APP版本更新提示");
 
        companion object {
            /**
             * 根据值获取枚举
             */
            fun fromValue(value: Int?): NotificationType? {
                return entries.find { it.value == value }
            }
        }
    }
 
    /**
     * 获取通知类型枚举
     */
    fun getNotificationTypeEnum(): NotificationType? {
        return NotificationType.fromValue(notificationType)
    }
}