package cn.ibizlab.r7.runtime.service.runtimemgr.dto;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import cn.ibizlab.r7.runtime.core.r7rt_base.valuerule.anno.userroletype.*;
import cn.ibizlab.r7.runtime.core.r7rt_base.domain.UserRoleType;
import org.springframework.cglib.beans.BeanCopier;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 服务DTO对象[UserRoleTypeDTO]
 */
public class UserRoleTypeDTO implements Serializable {

	private static final long serialVersionUID = 1L;

    /**
     * 属性 [CREATEDATE]
     *
     */
    @UserRoleTypeCreateDateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp createDate;

    @JsonIgnore
    private boolean createDateDirtyFlag;

    /**
     * 属性 [CREATEMAN]
     *
     */
    @UserRoleTypeCreateManDefault(info = "默认规则")
    private String createMan;

    @JsonIgnore
    private boolean createManDirtyFlag;

    /**
     * 属性 [UPDATEMAN]
     *
     */
    @UserRoleTypeUpdateManDefault(info = "默认规则")
    private String updateMan;

    @JsonIgnore
    private boolean updateManDirtyFlag;

    /**
     * 属性 [ENABLE]
     *
     */
    @UserRoleTypeEnableDefault(info = "默认规则")
    private Integer enable;

    @JsonIgnore
    private boolean enableDirtyFlag;

    /**
     * 属性 [UPDATEDATE]
     *
     */
    @UserRoleTypeUpdateDateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp updateDate;

    @JsonIgnore
    private boolean updateDateDirtyFlag;

    /**
     * 属性 [MEMO]
     *
     */
    @UserRoleTypeMemoDefault(info = "默认规则")
    private String memo;

    @JsonIgnore
    private boolean memoDirtyFlag;

    /**
     * 属性 [USERROLETYPEID]
     *
     */
    @UserRoleTypeUserRoleTypeIdDefault(info = "默认规则")
    private String userRoleTypeId;

    @JsonIgnore
    private boolean userRoleTypeIdDirtyFlag;

    /**
     * 属性 [USERROLETYPENAME]
     *
     */
    @UserRoleTypeUserRoleTypeNameDefault(info = "默认规则")
    private String userRoleTypeName;

    @JsonIgnore
    private boolean userRoleTypeNameDirtyFlag;


    /**
     * 获取 [CREATEDATE]
     */
    @JsonProperty("createdate")
    public Timestamp getCreateDate(){
        return createDate ;
    }

    /**
     * 设置 [CREATEDATE]
     */
    @JsonProperty("createdate")
    public void setCreateDate(Timestamp  createDate){
        this.createDate = createDate ;
        this.createDateDirtyFlag = true ;
    }

    /**
     * 获取 [CREATEDATE]脏标记
     */
    @JsonIgnore
    public boolean getCreateDateDirtyFlag(){
        return createDateDirtyFlag ;
    }

    /**
     * 获取 [CREATEMAN]
     */
    @JsonProperty("createman")
    public String getCreateMan(){
        return createMan ;
    }

    /**
     * 设置 [CREATEMAN]
     */
    @JsonProperty("createman")
    public void setCreateMan(String  createMan){
        this.createMan = createMan ;
        this.createManDirtyFlag = true ;
    }

    /**
     * 获取 [CREATEMAN]脏标记
     */
    @JsonIgnore
    public boolean getCreateManDirtyFlag(){
        return createManDirtyFlag ;
    }

    /**
     * 获取 [UPDATEMAN]
     */
    @JsonProperty("updateman")
    public String getUpdateMan(){
        return updateMan ;
    }

    /**
     * 设置 [UPDATEMAN]
     */
    @JsonProperty("updateman")
    public void setUpdateMan(String  updateMan){
        this.updateMan = updateMan ;
        this.updateManDirtyFlag = true ;
    }

    /**
     * 获取 [UPDATEMAN]脏标记
     */
    @JsonIgnore
    public boolean getUpdateManDirtyFlag(){
        return updateManDirtyFlag ;
    }

    /**
     * 获取 [ENABLE]
     */
    @JsonProperty("enable")
    public Integer getEnable(){
        return enable ;
    }

    /**
     * 设置 [ENABLE]
     */
    @JsonProperty("enable")
    public void setEnable(Integer  enable){
        this.enable = enable ;
        this.enableDirtyFlag = true ;
    }

    /**
     * 获取 [ENABLE]脏标记
     */
    @JsonIgnore
    public boolean getEnableDirtyFlag(){
        return enableDirtyFlag ;
    }

    /**
     * 获取 [UPDATEDATE]
     */
    @JsonProperty("updatedate")
    public Timestamp getUpdateDate(){
        return updateDate ;
    }

    /**
     * 设置 [UPDATEDATE]
     */
    @JsonProperty("updatedate")
    public void setUpdateDate(Timestamp  updateDate){
        this.updateDate = updateDate ;
        this.updateDateDirtyFlag = true ;
    }

    /**
     * 获取 [UPDATEDATE]脏标记
     */
    @JsonIgnore
    public boolean getUpdateDateDirtyFlag(){
        return updateDateDirtyFlag ;
    }

    /**
     * 获取 [MEMO]
     */
    @JsonProperty("memo")
    public String getMemo(){
        return memo ;
    }

    /**
     * 设置 [MEMO]
     */
    @JsonProperty("memo")
    public void setMemo(String  memo){
        this.memo = memo ;
        this.memoDirtyFlag = true ;
    }

    /**
     * 获取 [MEMO]脏标记
     */
    @JsonIgnore
    public boolean getMemoDirtyFlag(){
        return memoDirtyFlag ;
    }

    /**
     * 获取 [USERROLETYPEID]
     */
    @JsonProperty("userroletypeid")
    public String getUserRoleTypeId(){
        return userRoleTypeId ;
    }

    /**
     * 设置 [USERROLETYPEID]
     */
    @JsonProperty("userroletypeid")
    public void setUserRoleTypeId(String  userRoleTypeId){
        this.userRoleTypeId = userRoleTypeId ;
        this.userRoleTypeIdDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLETYPEID]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleTypeIdDirtyFlag(){
        return userRoleTypeIdDirtyFlag ;
    }

    /**
     * 获取 [USERROLETYPENAME]
     */
    @JsonProperty("userroletypename")
    public String getUserRoleTypeName(){
        return userRoleTypeName ;
    }

    /**
     * 设置 [USERROLETYPENAME]
     */
    @JsonProperty("userroletypename")
    public void setUserRoleTypeName(String  userRoleTypeName){
        this.userRoleTypeName = userRoleTypeName ;
        this.userRoleTypeNameDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLETYPENAME]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleTypeNameDirtyFlag(){
        return userRoleTypeNameDirtyFlag ;
    }



    public UserRoleType toDO() {
        UserRoleType srfdomain = new UserRoleType();
        if(getCreateDateDirtyFlag())
            srfdomain.setCreateDate(createDate);
        if(getCreateManDirtyFlag())
            srfdomain.setCreateMan(createMan);
        if(getUpdateManDirtyFlag())
            srfdomain.setUpdateMan(updateMan);
        if(getEnableDirtyFlag())
            srfdomain.setEnable(enable);
        if(getUpdateDateDirtyFlag())
            srfdomain.setUpdateDate(updateDate);
        if(getMemoDirtyFlag())
            srfdomain.setMemo(memo);
        if(getUserRoleTypeIdDirtyFlag())
            srfdomain.setUserRoleTypeId(userRoleTypeId);
        if(getUserRoleTypeNameDirtyFlag())
            srfdomain.setUserRoleTypeName(userRoleTypeName);

        return srfdomain;
    }

    public void fromDO(UserRoleType srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getCreateDateDirtyFlag())
            this.setCreateDate(srfdomain.getCreateDate());
        if(srfdomain.getCreateManDirtyFlag())
            this.setCreateMan(srfdomain.getCreateMan());
        if(srfdomain.getUpdateManDirtyFlag())
            this.setUpdateMan(srfdomain.getUpdateMan());
        if(srfdomain.getEnableDirtyFlag())
            this.setEnable(srfdomain.getEnable());
        if(srfdomain.getUpdateDateDirtyFlag())
            this.setUpdateDate(srfdomain.getUpdateDate());
        if(srfdomain.getMemoDirtyFlag())
            this.setMemo(srfdomain.getMemo());
        if(srfdomain.getUserRoleTypeIdDirtyFlag())
            this.setUserRoleTypeId(srfdomain.getUserRoleTypeId());
        if(srfdomain.getUserRoleTypeNameDirtyFlag())
            this.setUserRoleTypeName(srfdomain.getUserRoleTypeName());

    }

    public List<UserRoleTypeDTO> fromDOPage(List<UserRoleType> poPage)   {
        if(poPage == null)
            return null;
        List<UserRoleTypeDTO> dtos=new ArrayList<UserRoleTypeDTO>();
        for(UserRoleType domain : poPage) {
            UserRoleTypeDTO dto = new UserRoleTypeDTO();
            dto.fromDO(domain);
            dtos.add(dto);
        }
        return dtos;
    }
}

