package cn.ibizlab.humanresource.core.humanresource.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.humanresource.util.domain.EntityBase;
import cn.ibizlab.humanresource.util.annotation.DEField;
import cn.ibizlab.humanresource.util.enums.DEPredefinedFieldType;
import cn.ibizlab.humanresource.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.humanresource.util.annotation.Audit;


import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.humanresource.util.domain.EntityMP;

/**
 * 实体[奖励惩罚]
 */
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "T_HRREWARD",resultMap = "HRRewardResultMap")
public class HRReward extends EntityMP implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 奖惩名称
     */
    @TableField(value = "hrrewardname")
    @JSONField(name = "hrrewardname")
    @JsonProperty("hrrewardname")
    private String hrrewardname;
    /**
     * 奖励惩罚标识
     */
    @DEField(isKeyField=true)
    @TableId(value= "hrrewardid",type=IdType.ASSIGN_UUID)
    @JSONField(name = "hrrewardid")
    @JsonProperty("hrrewardid")
    private String hrrewardid;
    /**
     * 建立人
     */
    @DEField(preType = DEPredefinedFieldType.CREATEMAN)
    @TableField(value = "createman" , fill = FieldFill.INSERT)
    @JSONField(name = "createman")
    @JsonProperty("createman")
    private String createman;
    /**
     * 更新时间
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
    @TableField(value = "updatedate")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("updatedate")
    private Timestamp updatedate;
    /**
     * 建立时间
     */
    @DEField(preType = DEPredefinedFieldType.CREATEDATE)
    @TableField(value = "createdate" , fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("createdate")
    private Timestamp createdate;
    /**
     * 更新人
     */
    @DEField(preType = DEPredefinedFieldType.UPDATEMAN)
    @TableField(value = "updateman")
    @JSONField(name = "updateman")
    @JsonProperty("updateman")
    private String updateman;
    /**
     * 员工标识
     */
    @TableField(value = "hremployeeid")
    @JSONField(name = "hremployeeid")
    @JsonProperty("hremployeeid")
    private String hremployeeid;
    /**
     * 员工姓名
     */
    @TableField(exist = false)
    @JSONField(name = "hremployeename")
    @JsonProperty("hremployeename")
    private String hremployeename;
    /**
     * 奖惩分类
     */
    @TableField(value = "rewardtype")
    @JSONField(name = "rewardtype")
    @JsonProperty("rewardtype")
    private String rewardtype;
    /**
     * 奖惩级别
     */
    @TableField(value = "rewardlevel")
    @JSONField(name = "rewardlevel")
    @JsonProperty("rewardlevel")
    private String rewardlevel;
    /**
     * 奖惩金额
     */
    @TableField(value = "rewardmoney")
    @JSONField(name = "rewardmoney")
    @JsonProperty("rewardmoney")
    private Double rewardmoney;
    /**
     * 奖惩时间
     */
    @TableField(value = "rewardtime")
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "rewardtime" , format="yyyy-MM-dd")
    @JsonProperty("rewardtime")
    private Timestamp rewardtime;
    /**
     * 授予单位
     */
    @TableField(value = "authorganization")
    @JSONField(name = "authorganization")
    @JsonProperty("authorganization")
    private String authorganization;
    /**
     * 附件
     */
    @TableField(value = "attachment")
    @JSONField(name = "attachment")
    @JsonProperty("attachment")
    private String attachment;
    /**
     * 奖惩事件
     */
    @TableField(value = "rewardevent")
    @JSONField(name = "rewardevent")
    @JsonProperty("rewardevent")
    private String rewardevent;

    /**
     * 员工
     */
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private cn.ibizlab.humanresource.core.humanresource.domain.HREmployee hremployee;



    /**
     * 设置 [奖惩名称]
     */
    public void setHrrewardname(String hrrewardname){
        this.hrrewardname = hrrewardname ;
        this.modify("hrrewardname",hrrewardname);
    }

    /**
     * 设置 [员工标识]
     */
    public void setHremployeeid(String hremployeeid){
        this.hremployeeid = hremployeeid ;
        this.modify("hremployeeid",hremployeeid);
    }

    /**
     * 设置 [奖惩分类]
     */
    public void setRewardtype(String rewardtype){
        this.rewardtype = rewardtype ;
        this.modify("rewardtype",rewardtype);
    }

    /**
     * 设置 [奖惩级别]
     */
    public void setRewardlevel(String rewardlevel){
        this.rewardlevel = rewardlevel ;
        this.modify("rewardlevel",rewardlevel);
    }

    /**
     * 设置 [奖惩金额]
     */
    public void setRewardmoney(Double rewardmoney){
        this.rewardmoney = rewardmoney ;
        this.modify("rewardmoney",rewardmoney);
    }

    /**
     * 设置 [奖惩时间]
     */
    public void setRewardtime(Timestamp rewardtime){
        this.rewardtime = rewardtime ;
        this.modify("rewardtime",rewardtime);
    }

    /**
     * 格式化日期 [奖惩时间]
     */
    public String formatRewardtime(){
        if (this.rewardtime == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(rewardtime);
    }
    /**
     * 设置 [授予单位]
     */
    public void setAuthorganization(String authorganization){
        this.authorganization = authorganization ;
        this.modify("authorganization",authorganization);
    }

    /**
     * 设置 [附件]
     */
    public void setAttachment(String attachment){
        this.attachment = attachment ;
        this.modify("attachment",attachment);
    }

    /**
     * 设置 [奖惩事件]
     */
    public void setRewardevent(String rewardevent){
        this.rewardevent = rewardevent ;
        this.modify("rewardevent",rewardevent);
    }


}


