package com.mortals.xhx.module.matter.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.matter.model.vo.MatterCategoryVo;
import lombok.Data;
/**
* 事项材料分类实体对象
*
* @author zxfei
* @date 2023-06-21
*/
@Data
public class MatterCategoryEntity extends MatterCategoryVo {
    private static final long serialVersionUID = 1L;

    /**
    * 分类编码
    */
    private String categoryCode;
    /**
    * 分类名称
    */
    private String categoryName;
    /**
    * 事项Id
    */
    private Long matterId;
    /**
    * 事项名称
    */
    private String matterName;
    /**
    * 排序字段
    */
    private Integer sort;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof MatterCategoryEntity) {
            MatterCategoryEntity tmp = (MatterCategoryEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.categoryCode = "";

            this.categoryName = "";

            this.matterId = -1L;

            this.matterName = "";

            this.sort = 0;
    }
}