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

import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.vo.ProductVo;
/**
* 产品实体对象
*
* @author zxfei
* @date 2022-04-25
*/

public class ProductEntity extends ProductVo {
    private static final long serialVersionUID = 1L;

    /**
    * 产品名称，名称唯一
    */
    @Excel(name = "产品名称，名称唯一")
    private String productName;
    /**
    * 产品编码，编码唯一
    */
    private String productCode;
    /**
    * 交换机名称,英文必填，默认产品编码
    */
    private String exchangeName;
    /**
    * 备注
    */
    private String productRemark;



    public ProductEntity(){}
    /**
    * 获取 产品名称，名称唯一
    * @return String
    */
    public String getProductName(){
        return productName;
    }
    /**
    * 设置 产品名称，名称唯一
    * @param productName
    */
    public void setProductName(String productName){
        this.productName = productName;
    }
    /**
    * 获取 产品编码，编码唯一
    * @return String
    */
    public String getProductCode(){
        return productCode;
    }
    /**
    * 设置 产品编码，编码唯一
    * @param productCode
    */
    public void setProductCode(String productCode){
        this.productCode = productCode;
    }
    /**
    * 获取 交换机名称,英文必填，默认产品编码
    * @return String
    */
    public String getExchangeName(){
        return exchangeName;
    }
    /**
    * 设置 交换机名称,英文必填，默认产品编码
    * @param exchangeName
    */
    public void setExchangeName(String exchangeName){
        this.exchangeName = exchangeName;
    }
    /**
    * 获取 备注
    * @return String
    */
    public String getProductRemark(){
        return productRemark;
    }
    /**
    * 设置 备注
    * @param productRemark
    */
    public void setProductRemark(String productRemark){
        this.productRemark = productRemark;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof ProductEntity) {
            ProductEntity tmp = (ProductEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",productName:").append(getProductName());
        sb.append(",productCode:").append(getProductCode());
        sb.append(",exchangeName:").append(getExchangeName());
        sb.append(",productRemark:").append(getProductRemark());
        return sb.toString();
    }

    public void initAttrValue(){

            this.productName = "";

            this.productCode = "";

            this.exchangeName = "";

            this.productRemark = "";
    }
}