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-07-11
 */

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

    /**
     * 关联平台
     */
    private Long platformId;
    /**
     * 产品名称，名称唯一
     */
    @Excel(name = "产品名称，名称唯一")
    private String productName;
    /**
     * 产品编码
     */
    private String productCode;
    /**
     * 备注
     */
    private String productRemark;



    public ProductEntity(){}
    /**
     * 获取 关联平台
     * @return Long
     */
    public Long getPlatformId(){
        return platformId;
    }
    /**
     * 设置 关联平台
     * @param platformId
     */
    public void setPlatformId(Long platformId){
        this.platformId = platformId;
    }
    /**
     * 获取 产品名称，名称唯一
     * @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 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(",platformId:").append(getPlatformId());
        sb.append(",productName:").append(getProductName());
        sb.append(",productCode:").append(getProductCode());
        sb.append(",productRemark:").append(getProductRemark());
        return sb.toString();
    }

    public void initAttrValue(){

        this.platformId = null;

        this.productName = "";

        this.productCode = "";

        this.productRemark = "";
    }
}