package com.sa.ibiz.demo.demo.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.cglib.beans.BeanGenerator;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.util.Map;
import java.util.HashMap;
import org.springframework.util.StringUtils;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import org.springframework.cglib.beans.BeanCopier;
import com.sa.ibiz.demo.ibizutil.annotation.Dict;
import com.sa.ibiz.demo.ibizutil.domain.EntityBase;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.math.BigInteger;
import com.sa.ibiz.demo.ibizutil.enums.FillMode;
import com.sa.ibiz.demo.ibizutil.enums.PredefinedType;
import com.sa.ibiz.demo.ibizutil.annotation.PreField;
import com.alibaba.fastjson.annotation.JSONField;

import com.sa.ibiz.demo.demo.domain.WFInstance;
import com.sa.ibiz.demo.demo.domain.WFStepActor;
import com.sa.ibiz.demo.demo.domain.WFWorkflow;

/**
 * 实体[WFAssistWork] 数据对象
 */
@TableName(value = "T_SRFWFASSISTWORK",resultMap = "WFAssistWorkResultMap")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class WFAssistWork extends EntityBase implements Serializable{

    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFInstance wfinstance;
    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFStepActor wfstepactor;
    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFWorkflow wfworkflow;
    @TableField(exist = false)//逻辑属性
    private String activestepid;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEDATE)
    private Timestamp createdate;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEMAN)
    @Dict(dictName = "ionicdemo_SysOperatorCodeList")
    private String createman;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEDATE)
    private Timestamp updatedate;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEMAN)
    @Dict(dictName = "ionicdemo_SysOperatorCodeList")
    private String updateman;
    @TableField(exist = false)//逻辑属性
    private String userdata;
    @TableField(exist = false)//逻辑属性
    private String userdata4;
    @TableId(value= "wfassistworkid",type=IdType.UUID)//指定主键生成策略
    private String wfassistworkid;
    private String wfassistworkname;
    private String wfinstanceid;
    @TableField(exist = false)//逻辑属性
    private String wfinstancename;
    private String wfplogicname;
    private String wfstepactorid;
    @TableField(exist = false)//逻辑属性
    private String wfstepactorname;
    private String wfstepid;
    private String wfworkflowid;
    @TableField(exist = false)//逻辑属性
    private String wfworkflowname;
    /**
     *  设置属性值[ACTIVESTEPID]
     *  @param activestepid
     */
    public void setActivestepid(String activestepid){
        if(StringUtils.isEmpty(activestepid))
            activestepid=null;
        this.activestepid = activestepid;
        this.set("activestepiddirtyflag",true);
    }
    /**
     *  获取属性值[ACTIVESTEPID]
     */
    public String getActivestepid(){
        return this.activestepid;
    }
    /**
     *  重置属性值[ACTIVESTEPID]
     */
    public void resetActivestepid(){
        this.set("activestepiddirtyflag",false);
        this.activestepid = null;
    }
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreatedate(Timestamp createdate){
        this.createdate = createdate;
        this.set("createdatedirtyflag",true);
    }
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreatedate(){
        return this.createdate;
    }
    /**
     *  重置属性值[建立时间]
     */
    public void resetCreatedate(){
        this.set("createdatedirtyflag",false);
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]
     *  @param createman
     */
    public void setCreateman(String createman){
        if(StringUtils.isEmpty(createman))
            createman=null;
        this.createman = createman;
        this.set("createmandirtyflag",true);
    }
    /**
     *  获取属性值[建立人]
     */
    public String getCreateman(){
        return this.createman;
    }
    /**
     *  重置属性值[建立人]
     */
    public void resetCreateman(){
        this.set("createmandirtyflag",false);
        this.createman = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdatedate(Timestamp updatedate){
        this.updatedate = updatedate;
        this.set("updatedatedirtyflag",true);
    }
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdatedate(){
        return this.updatedate;
    }
    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdatedate(){
        this.set("updatedatedirtyflag",false);
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]
     *  @param updateman
     */
    public void setUpdateman(String updateman){
        if(StringUtils.isEmpty(updateman))
            updateman=null;
        this.updateman = updateman;
        this.set("updatemandirtyflag",true);
    }
    /**
     *  获取属性值[更新人]
     */
    public String getUpdateman(){
        return this.updateman;
    }
    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateman(){
        this.set("updatemandirtyflag",false);
        this.updateman = null;
    }
    /**
     *  设置属性值[USERDATA]
     *  @param userdata
     */
    public void setUserdata(String userdata){
        if(StringUtils.isEmpty(userdata))
            userdata=null;
        this.userdata = userdata;
        this.set("userdatadirtyflag",true);
    }
    /**
     *  获取属性值[USERDATA]
     */
    public String getUserdata(){
        return this.userdata;
    }
    /**
     *  重置属性值[USERDATA]
     */
    public void resetUserdata(){
        this.set("userdatadirtyflag",false);
        this.userdata = null;
    }
    /**
     *  设置属性值[USERDATA4]
     *  @param userdata4
     */
    public void setUserdata4(String userdata4){
        if(StringUtils.isEmpty(userdata4))
            userdata4=null;
        this.userdata4 = userdata4;
        this.set("userdata4dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATA4]
     */
    public String getUserdata4(){
        return this.userdata4;
    }
    /**
     *  重置属性值[USERDATA4]
     */
    public void resetUserdata4(){
        this.set("userdata4dirtyflag",false);
        this.userdata4 = null;
    }
    /**
     *  设置属性值[工作流代办工作标识]
     *  @param wfassistworkid
     */
    public void setWfassistworkid(String wfassistworkid){
        if(StringUtils.isEmpty(wfassistworkid))
            wfassistworkid=null;
        this.wfassistworkid = wfassistworkid;
        this.set("wfassistworkiddirtyflag",true);
    }
    /**
     *  获取属性值[工作流代办工作标识]
     */
    public String getWfassistworkid(){
        return this.wfassistworkid;
    }
    /**
     *  重置属性值[工作流代办工作标识]
     */
    public void resetWfassistworkid(){
        this.set("wfassistworkiddirtyflag",false);
        this.wfassistworkid = null;
    }
    /**
     *  设置属性值[工作流代办工作名称]
     *  @param wfassistworkname
     */
    public void setWfassistworkname(String wfassistworkname){
        if(StringUtils.isEmpty(wfassistworkname))
            wfassistworkname=null;
        this.wfassistworkname = wfassistworkname;
        this.set("wfassistworknamedirtyflag",true);
    }
    /**
     *  获取属性值[工作流代办工作名称]
     */
    public String getWfassistworkname(){
        return this.wfassistworkname;
    }
    /**
     *  重置属性值[工作流代办工作名称]
     */
    public void resetWfassistworkname(){
        this.set("wfassistworknamedirtyflag",false);
        this.wfassistworkname = null;
    }
    /**
     *  设置属性值[流程实例]
     *  @param wfinstanceid
     */
    public void setWfinstanceid(String wfinstanceid){
        if(StringUtils.isEmpty(wfinstanceid))
            wfinstanceid=null;
        this.wfinstanceid = wfinstanceid;
        this.set("wfinstanceiddirtyflag",true);
    }
    /**
     *  获取属性值[流程实例]
     */
    public String getWfinstanceid(){
        return this.wfinstanceid;
    }
    /**
     *  重置属性值[流程实例]
     */
    public void resetWfinstanceid(){
        this.set("wfinstanceiddirtyflag",false);
        this.wfinstanceid = null;
    }
    /**
     *  设置属性值[流程实例]
     *  @param wfinstancename
     */
    public void setWfinstancename(String wfinstancename){
        if(StringUtils.isEmpty(wfinstancename))
            wfinstancename=null;
        this.wfinstancename = wfinstancename;
        this.set("wfinstancenamedirtyflag",true);
    }
    /**
     *  获取属性值[流程实例]
     */
    public String getWfinstancename(){
        return this.wfinstancename;
    }
    /**
     *  重置属性值[流程实例]
     */
    public void resetWfinstancename(){
        this.set("wfinstancenamedirtyflag",false);
        this.wfinstancename = null;
    }
    /**
     *  设置属性值[流程步骤名称]
     *  @param wfplogicname
     */
    public void setWfplogicname(String wfplogicname){
        if(StringUtils.isEmpty(wfplogicname))
            wfplogicname=null;
        this.wfplogicname = wfplogicname;
        this.set("wfplogicnamedirtyflag",true);
    }
    /**
     *  获取属性值[流程步骤名称]
     */
    public String getWfplogicname(){
        return this.wfplogicname;
    }
    /**
     *  重置属性值[流程步骤名称]
     */
    public void resetWfplogicname(){
        this.set("wfplogicnamedirtyflag",false);
        this.wfplogicname = null;
    }
    /**
     *  设置属性值[步骤操作者]
     *  @param wfstepactorid
     */
    public void setWfstepactorid(String wfstepactorid){
        if(StringUtils.isEmpty(wfstepactorid))
            wfstepactorid=null;
        this.wfstepactorid = wfstepactorid;
        this.set("wfstepactoriddirtyflag",true);
    }
    /**
     *  获取属性值[步骤操作者]
     */
    public String getWfstepactorid(){
        return this.wfstepactorid;
    }
    /**
     *  重置属性值[步骤操作者]
     */
    public void resetWfstepactorid(){
        this.set("wfstepactoriddirtyflag",false);
        this.wfstepactorid = null;
    }
    /**
     *  设置属性值[步骤操作者]
     *  @param wfstepactorname
     */
    public void setWfstepactorname(String wfstepactorname){
        if(StringUtils.isEmpty(wfstepactorname))
            wfstepactorname=null;
        this.wfstepactorname = wfstepactorname;
        this.set("wfstepactornamedirtyflag",true);
    }
    /**
     *  获取属性值[步骤操作者]
     */
    public String getWfstepactorname(){
        return this.wfstepactorname;
    }
    /**
     *  重置属性值[步骤操作者]
     */
    public void resetWfstepactorname(){
        this.set("wfstepactornamedirtyflag",false);
        this.wfstepactorname = null;
    }
    /**
     *  设置属性值[流程步骤标识]
     *  @param wfstepid
     */
    public void setWfstepid(String wfstepid){
        if(StringUtils.isEmpty(wfstepid))
            wfstepid=null;
        this.wfstepid = wfstepid;
        this.set("wfstepiddirtyflag",true);
    }
    /**
     *  获取属性值[流程步骤标识]
     */
    public String getWfstepid(){
        return this.wfstepid;
    }
    /**
     *  重置属性值[流程步骤标识]
     */
    public void resetWfstepid(){
        this.set("wfstepiddirtyflag",false);
        this.wfstepid = null;
    }
    /**
     *  设置属性值[工作流]
     *  @param wfworkflowid
     */
    public void setWfworkflowid(String wfworkflowid){
        if(StringUtils.isEmpty(wfworkflowid))
            wfworkflowid=null;
        this.wfworkflowid = wfworkflowid;
        this.set("wfworkflowiddirtyflag",true);
    }
    /**
     *  获取属性值[工作流]
     */
    public String getWfworkflowid(){
        return this.wfworkflowid;
    }
    /**
     *  重置属性值[工作流]
     */
    public void resetWfworkflowid(){
        this.set("wfworkflowiddirtyflag",false);
        this.wfworkflowid = null;
    }
    /**
     *  设置属性值[工作流]
     *  @param wfworkflowname
     */
    public void setWfworkflowname(String wfworkflowname){
        if(StringUtils.isEmpty(wfworkflowname))
            wfworkflowname=null;
        this.wfworkflowname = wfworkflowname;
        this.set("wfworkflownamedirtyflag",true);
    }
    /**
     *  获取属性值[工作流]
     */
    public String getWfworkflowname(){
        return this.wfworkflowname;
    }
    /**
     *  重置属性值[工作流]
     */
    public void resetWfworkflowname(){
        this.set("wfworkflownamedirtyflag",false);
        this.wfworkflowname = null;
    }
     /**
     *  获取主实体关联数据[WFInstance]
     */
    public WFInstance getWfinstance() {
        return wfinstance;
    }
    /**
     *  设置主实体关联数据[WFInstance]
     */
    public void setWfinstance(WFInstance wfinstance) {
        this.wfinstance = wfinstance;
    }

     /**
     *  获取主实体关联数据[WFStepActor]
     */
    public WFStepActor getWfstepactor() {
        return wfstepactor;
    }
    /**
     *  设置主实体关联数据[WFStepActor]
     */
    public void setWfstepactor(WFStepActor wfstepactor) {
        this.wfstepactor = wfstepactor;
    }

     /**
     *  获取主实体关联数据[WFWorkflow]
     */
    public WFWorkflow getWfworkflow() {
        return wfworkflow;
    }
    /**
     *  设置主实体关联数据[WFWorkflow]
     */
    public void setWfworkflow(WFWorkflow wfworkflow) {
        this.wfworkflow = wfworkflow;
    }

    /**
     * 重置当前数据对象属性值
     */
    public  void reset(){
        resetActivestepid();
        resetCreatedate();
        resetCreateman();
        resetUpdatedate();
        resetUpdateman();
        resetUserdata();
        resetUserdata4();
        resetWfassistworkid();
        resetWfassistworkname();
        resetWfinstanceid();
        resetWfinstancename();
        resetWfplogicname();
        resetWfstepactorid();
        resetWfstepactorname();
        resetWfstepid();
        resetWfworkflowid();
        resetWfworkflowname();
    }
     /**
     * 获取数据主键（普通主键与联合主键）
     * @return
     */
    @JsonIgnore
    public Serializable getDefaultPrimaryKey()
    {
	    //随机生成主键
         return  IdWorker.get32UUID();

    }
     /**
     * 复制当前对象数据到目标对象(粘贴重置)
     *
     * @throws Exception
     */
    public WFAssistWork copyTo(WFAssistWork targetEntity)
	{
		BeanCopier copier=BeanCopier.create(WFAssistWork.class, WFAssistWork.class, false);
		copier.copy(this, targetEntity, null);
        targetEntity.resetWfassistworkid();
		return targetEntity;
	}
}