package com.mortals.xhx.base.system.param.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.framework.service.IParam;
import com.mortals.xhx.base.system.param.model.vo.ParamVo;
import lombok.Data;
/**
* 参数信息业务实体对象
*
* @author zxfei
* @date 2024-09-06
*/
@Data
public class ParamEntity extends ParamVo implements IParam {
    private static final long serialVersionUID = 1L;

    /**
    * 参数名称
    */
    private String name;
    /**
    * 一级组织，如：平台配置
    */
    private String firstOrganize;
    /**
    * 二级组织，如：基础配置
    */
    private String secondOrganize;
    /**
    * 参数键，全局唯一
    */
    private String paramKey;
    /**
    * 参数值
    */
    private String paramValue;
    /**
    * 参数有效状态(0.禁用，1.启用)
    */
    private Integer validStatus;
    /**
    * 参数修改状态，(0.隐藏，1.页面仅查看，2.页面可修改，3.页面可删除，4.页面可修改删除)
    */
    private Integer modStatus;
    /**
    * 展现类型 (0.普通文本框，1.多行文本框，2.开关，3.块输入框)
    */
    private Integer displayType;
    /**
    * 备注
    */
    private String remark;
    /**
    * 创建用户名称
    */
    private String createUserName;
    /**
    * 创建用户名称
    */
    private String updateUserName;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof ParamEntity) {
            ParamEntity tmp = (ParamEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
            this.name = "";
            this.firstOrganize = "";
            this.secondOrganize = "";
            this.paramKey = "";
            this.paramValue = "";
            this.validStatus = 1;
            this.modStatus = 4;
            this.displayType = 0;
            this.remark = "";
            this.createUserName = "";
            this.updateUserName = "";
    }
}