package com.brframework.webapppatch.json;

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.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.time.LocalDateTime;

/**
 * @author xu
 * @date 2019/11/14 18:40
 */
@Data
@ApiModel
public class AppPatchVersionListSimpleResult {


    @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 = "Android")
    @SelectColumn(options = {"ANDROID,ANDROID", "IOS,IOS"})
    private String os;

    @ApiModelProperty(value = "分支", required = true, example = "Android")
    private String branch;

    @ApiModelProperty(value = "版本号",required = true, example = "30")
    private Integer version;

    @ApiModelProperty(value = "新版本信息",required = true, example = "更新了挺多的了")
    private String versionMessage;

    @ApiModelProperty(value = "更新类型", example = "1", allowableValues = "1,2")
    @SelectColumn(options = {"1,重启后生效", "2,立即生效"})
    private Integer updateType;

    @ApiModelProperty(value = "更新状态", example = "1", allowableValues = "1,2,3,4")
    @SelectColumn(options = {"1,部署成功", "2,灰度测试", "3,发布", "4,失败"})
    private Integer updateStatus;



}
