package com.zy.asrs.entity; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @Data @TableName("asr_app_version") public class AppVersion implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty(value= "") @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 版本号 */ @ApiModelProperty(value= "版本号") private String version; /** * app路径 */ @ApiModelProperty(value= "app路径") private String path; /** * 是否为最新版本 0: 不是 1: 是 */ @ApiModelProperty(value= "是否为最新版本 0: 否 1: 是 ") private Integer latest; /** * app类型 0: pad 1: 电视 */ @ApiModelProperty(value= "app类型 0: pda 1: lcd ") private Integer type; public AppVersion() {} public AppVersion(String version, String path, Integer latest, Integer type) { this.version = version; this.path = path; this.latest = latest; this.type = type; } // AppVersion appVersion = new AppVersion( // null, // 版本号 // null, // app路径 // null, // 是否为最新版本 // null // app类型 // ); public String getLatest$(){ if (null == this.latest){ return null; } switch (this.latest){ case 0: return "否"; case 1: return "是"; default: return String.valueOf(this.latest); } } public String getType$(){ if (null == this.type){ return null; } switch (this.type){ case 0: return "pda"; case 1: return "lcd"; default: return String.valueOf(this.type); } } }