package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * version对象 app_version
 * 
 * @author haotian
 * @date 2025-03-20
 */
public class AppVersion extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 版本id */
    private Long id;

    /** 版本号，如1.0.0 */
    @Excel(name = "版本号，如1.0.0")
    private String version;

    /** 版本代码，用于比较版本大小 */
    @Excel(name = "版本代码，用于比较版本大小")
    private Long versionCode;

    /** 平台：android/ios */
    @Excel(name = "平台：android/ios")
    private String platform;

    /** 下载地址 */
    @Excel(name = "下载地址")
    private String downloadUrl;

    /** 更新说明 */
    @Excel(name = "更新说明")
    private String description;

    /** 是否强制更新 */
    @Excel(name = "是否强制更新")
    private Integer forceUpdate;

    /** 文件大小（字节） */
    @Excel(name = "文件大小", readConverterExp = "字=节")
    private Long fileSize;

    /** 文件MD5值 */
    @Excel(name = "文件MD5值")
    private String md5;

    /** 最低支持版本 */
    @Excel(name = "最低支持版本")
    private String minVersion;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 状态：0-禁用，1-启用 */
    @Excel(name = "状态：0-禁用，1-启用")
    private Integer status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setVersion(String version) 
    {
        this.version = version;
    }

    public String getVersion() 
    {
        return version;
    }
    public void setVersionCode(Long versionCode) 
    {
        this.versionCode = versionCode;
    }

    public Long getVersionCode() 
    {
        return versionCode;
    }
    public void setPlatform(String platform) 
    {
        this.platform = platform;
    }

    public String getPlatform() 
    {
        return platform;
    }
    public void setDownloadUrl(String downloadUrl) 
    {
        this.downloadUrl = downloadUrl;
    }

    public String getDownloadUrl() 
    {
        return downloadUrl;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setForceUpdate(Integer forceUpdate) 
    {
        this.forceUpdate = forceUpdate;
    }

    public Integer getForceUpdate() 
    {
        return forceUpdate;
    }
    public void setFileSize(Long fileSize) 
    {
        this.fileSize = fileSize;
    }

    public Long getFileSize() 
    {
        return fileSize;
    }
    public void setMd5(String md5) 
    {
        this.md5 = md5;
    }

    public String getMd5() 
    {
        return md5;
    }
    public void setMinVersion(String minVersion) 
    {
        this.minVersion = minVersion;
    }

    public String getMinVersion() 
    {
        return minVersion;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("version", getVersion())
            .append("versionCode", getVersionCode())
            .append("platform", getPlatform())
            .append("downloadUrl", getDownloadUrl())
            .append("description", getDescription())
            .append("forceUpdate", getForceUpdate())
            .append("fileSize", getFileSize())
            .append("md5", getMd5())
            .append("minVersion", getMinVersion())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("status", getStatus())
            .toString();
    }
}
