package com.mortals.xhx.module.product.model;

import com.mortals.framework.annotation.Excel;
import com.mortals.xhx.module.product.model.vo.ProductVersionVo;
import lombok.Data;
/**
 * 产品客户端版本实体对象
 *
 * @author zxfei
 * @date 2023-08-18
 */
@Data
public class ProductVersionEntity extends ProductVersionVo {
    private static final long serialVersionUID = 1L;

    /**
     * 产品Id
     */
    private Long productId;
    /**
     * 产品编码
     */
    private String productCode;
    /**
     * 产品名称
     */
    private String productName;
    /**
     * 文件相对路径地址
     */
    @Excel(name = "文件相对路径地址")
    private String filePath;
    /**
     * 版本号
     */
    @Excel(name = "版本号")
    private Integer version;
    /**
     * 备注信息
     */
    @Excel(name = "备注信息")
    private String remark;
    /**
     * 站点Id，来源基础服务平台
     */
    private Long siteId;
    /**
     * 站点编号，来源基础服务平台
     */
    private String siteCode;
    /**
     * 站点名称
     */
    private String siteName;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof ProductVersionEntity) {
            ProductVersionEntity tmp = (ProductVersionEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.productId = 0L;
        this.productCode = "";
        this.productName = "";
        this.filePath = "";
        this.version = 0;
        this.remark = "";
        this.siteId = 0L;
        this.siteCode = "";
        this.siteName = "";
    }
}