PatchVersion.java
3.4 KB
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
package com.brframework.webapppatch.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.brframework.commoncms.annatotion.column.SelectColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.time.LocalDateTime;
/**
* 热更新版本
* @author xu
* @date 2019/11/14 10:25
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
@Table(name = "sys_patch_version")
public class PatchVersion {
/** 重启后生效 */
public static final Integer UPDATE_TYPE_RESTART = 1;
/** 立即生效 */
public static final Integer UPDATE_TYPE_IMMEDIATELY = 2;
/** 部署成功 */
public static final Integer UPDATE_STATUS_DEPLOY = 1;
/** 灰度发布 */
public static final Integer UPDATE_STATUS_GRAY = 2;
/** 正式发布 */
public static final Integer UPDATE_STATUS_RELEASE = 3;
/** 版本失败 */
public static final Integer UPDATE_STATUS_DEFEATED = 4;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "id", required = true, example = "1")
Long id;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间", example = "2018-03-13 15:26:19")
@Column(updatable = false)
LocalDateTime createDate;
@ApiModelProperty(value = "版本号",required = true, example = "30")
private Integer version;
@ApiModelProperty(value = "新版本信息",required = true, example = "更新了挺多的了")
private String versionMessage;
@ApiModelProperty(value = "新版本下载地址",required = true, example = "http://wwww.google.com")
@Column(length = 2048)
private String versionUrl;
@ApiModelProperty(value = "补丁包下载地址",required = true, example = "http://wwww.google.com")
@Column(length = 2048)
private String patchUrl;
@ApiModelProperty(value = "更新类型(1.重启后生效 2.立即生效)", example = "1", allowableValues = "1,2")
@SelectColumn(options = {"1,重启后生效", "2,立即生效"})
private Integer updateType;
@ApiModelProperty(value = "更新状态(1.部署成功 2.灰度测试 3.发布 4.失败)", example = "1", allowableValues = "1,2,3,4")
@SelectColumn(options = {"1,部署成功", "2,灰度测试", "3,发布", "4,失败"})
private Integer updateStatus;
@ApiModelProperty(value = "文件hash",required = true, example = "ssfsdw435gfhfgr6egdfg")
private String hash;
@ApiModelProperty(value = "补丁文件hash",required = true, example = "ssfsdw435gfhfgr6egdfg")
private String patchHash;
@ApiModelProperty(value = "assets文件hash",required = true, example = "ssfsdw435gfhfgr6egdfg")
private String assetsHash;
@ApiModelProperty(value = "bundle文件hash",required = true, example = "ssfsdw435gfhfgr6egdfg")
private String bundleHash;
@ApiModelProperty(value = "文件大小",required = true, example = "1184219")
private long fileSize;
@ApiModelProperty(value = "补丁文件大小",required = true, example = "1184219")
private long patchFileSize;
@ApiModelProperty(value = "操作系统", required = true, example = "Android")
private String os;
@ApiModelProperty(value = "分支", required = true, example = "Android")
private String branch;
}