package cn.estsh.i3plus.pojo.model.platform;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;

/**
 * @Description : 缺失资源
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2020-04-01 09:31
 * @Modify:
 **/
@Data
public class MissResourceModel implements Serializable {

    private static final long serialVersionUID = 677360677490162891L;

    @ApiParam(value = "主键")
    @AnnoOutputColumn
    private String key;

    @ApiParam(value = "产品类型", example = "0", access = "softTyp DOC: http://doc.estsh.com/docs/i3plus_api/i3plus_api-impp")
    @AnnoOutputColumn(refClass = CommonEnumUtil.SOFT_TYPE.class, required = false)
    private Integer softType;

    @AnnoOutputColumn(refClass = CommonEnumUtil.SYS_LOCALE_RESOURCE_TYPE.class)
    @ApiParam(value = "资源类型", example = "1", access = "使用枚举：CommonEnumUtil.SYS_LOCALE_RESOURCE_TYPE")
    private Integer resourceType;

    public String getResourceTypeTxt(){
        return resourceType == null ?"无": CommonEnumUtil.SYS_LOCALE_RESOURCE_TYPE.valueOf(resourceType);
    }

    @ApiParam(value = "语言编码", example = "浏览器语言编码")
    @AnnoOutputColumn
    private String languageCode;

    @ApiParam(value = "资源KEY")
    @AnnoOutputColumn
    private String resourceKey;

    @ApiParam(value = "资源Value")
    @AnnoOutputColumn
    private String resourceValue;

    @ApiParam(value = "数据来源")
    @AnnoOutputColumn(refClass = CommonEnumUtil.MiSS_RESOURCE_SOURCE.class)
    private Integer resourceSource;

    public String getResourceSourceTxt(){
        return resourceSource == null ?"无": CommonEnumUtil.MiSS_RESOURCE_SOURCE.valueOfDescription(resourceSource);
    }

    @ApiParam(value = "数据来源")
    @AnnoOutputColumn(refClass = CommonEnumUtil.IS_VAILD.class)
    private Integer isValid;

}
