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.userroleres.*;
import cn.ibizlab.r7.runtime.core.r7rt_base.domain.UserRoleRes;
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对象[UserRoleResDTO]
 */
public class UserRoleResDTO implements Serializable {

	private static final long serialVersionUID = 1L;

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

    @JsonIgnore
    private boolean createManDirtyFlag;

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

    @JsonIgnore
    private boolean updateManDirtyFlag;

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

    @JsonIgnore
    private boolean enableDirtyFlag;

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

    @JsonIgnore
    private boolean createDateDirtyFlag;

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

    @JsonIgnore
    private boolean updateDateDirtyFlag;

    /**
     * 属性 [USERROLERESID]
     *
     */
    @UserRoleResUserRoleResIdDefault(info = "默认规则")
    private String userRoleResId;

    @JsonIgnore
    private boolean userRoleResIdDirtyFlag;

    /**
     * 属性 [USERROLERESNAME]
     *
     */
    @UserRoleResUserRoleResNameDefault(info = "默认规则")
    private String userRoleResName;

    @JsonIgnore
    private boolean userRoleResNameDirtyFlag;

    /**
     * 属性 [USERROLENAME]
     *
     */
    @UserRoleResUserRoleNameDefault(info = "默认规则")
    private String userRoleName;

    @JsonIgnore
    private boolean userRoleNameDirtyFlag;

    /**
     * 属性 [UNIRESNAME]
     *
     */
    @UserRoleResUniResNameDefault(info = "默认规则")
    private String uniResName;

    @JsonIgnore
    private boolean uniResNameDirtyFlag;

    /**
     * 属性 [USERROLEID]
     *
     */
    @UserRoleResUserRoleIdDefault(info = "默认规则")
    private String userRoleId;

    @JsonIgnore
    private boolean userRoleIdDirtyFlag;

    /**
     * 属性 [UNIRESID]
     *
     */
    @UserRoleResUniResIdDefault(info = "默认规则")
    private String uniResId;

    @JsonIgnore
    private boolean uniResIdDirtyFlag;


    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [USERROLERESID]
     */
    @JsonProperty("userroleresid")
    public String getUserRoleResId(){
        return userRoleResId ;
    }

    /**
     * 设置 [USERROLERESID]
     */
    @JsonProperty("userroleresid")
    public void setUserRoleResId(String  userRoleResId){
        this.userRoleResId = userRoleResId ;
        this.userRoleResIdDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLERESID]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleResIdDirtyFlag(){
        return userRoleResIdDirtyFlag ;
    }

    /**
     * 获取 [USERROLERESNAME]
     */
    @JsonProperty("userroleresname")
    public String getUserRoleResName(){
        return userRoleResName ;
    }

    /**
     * 设置 [USERROLERESNAME]
     */
    @JsonProperty("userroleresname")
    public void setUserRoleResName(String  userRoleResName){
        this.userRoleResName = userRoleResName ;
        this.userRoleResNameDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLERESNAME]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleResNameDirtyFlag(){
        return userRoleResNameDirtyFlag ;
    }

    /**
     * 获取 [USERROLENAME]
     */
    @JsonProperty("userrolename")
    public String getUserRoleName(){
        return userRoleName ;
    }

    /**
     * 设置 [USERROLENAME]
     */
    @JsonProperty("userrolename")
    public void setUserRoleName(String  userRoleName){
        this.userRoleName = userRoleName ;
        this.userRoleNameDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLENAME]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleNameDirtyFlag(){
        return userRoleNameDirtyFlag ;
    }

    /**
     * 获取 [UNIRESNAME]
     */
    @JsonProperty("uniresname")
    public String getUniResName(){
        return uniResName ;
    }

    /**
     * 设置 [UNIRESNAME]
     */
    @JsonProperty("uniresname")
    public void setUniResName(String  uniResName){
        this.uniResName = uniResName ;
        this.uniResNameDirtyFlag = true ;
    }

    /**
     * 获取 [UNIRESNAME]脏标记
     */
    @JsonIgnore
    public boolean getUniResNameDirtyFlag(){
        return uniResNameDirtyFlag ;
    }

    /**
     * 获取 [USERROLEID]
     */
    @JsonProperty("userroleid")
    public String getUserRoleId(){
        return userRoleId ;
    }

    /**
     * 设置 [USERROLEID]
     */
    @JsonProperty("userroleid")
    public void setUserRoleId(String  userRoleId){
        this.userRoleId = userRoleId ;
        this.userRoleIdDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLEID]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleIdDirtyFlag(){
        return userRoleIdDirtyFlag ;
    }

    /**
     * 获取 [UNIRESID]
     */
    @JsonProperty("uniresid")
    public String getUniResId(){
        return uniResId ;
    }

    /**
     * 设置 [UNIRESID]
     */
    @JsonProperty("uniresid")
    public void setUniResId(String  uniResId){
        this.uniResId = uniResId ;
        this.uniResIdDirtyFlag = true ;
    }

    /**
     * 获取 [UNIRESID]脏标记
     */
    @JsonIgnore
    public boolean getUniResIdDirtyFlag(){
        return uniResIdDirtyFlag ;
    }



    public UserRoleRes toDO() {
        UserRoleRes srfdomain = new UserRoleRes();
        if(getCreateManDirtyFlag())
            srfdomain.setCreateMan(createMan);
        if(getUpdateManDirtyFlag())
            srfdomain.setUpdateMan(updateMan);
        if(getEnableDirtyFlag())
            srfdomain.setEnable(enable);
        if(getCreateDateDirtyFlag())
            srfdomain.setCreateDate(createDate);
        if(getUpdateDateDirtyFlag())
            srfdomain.setUpdateDate(updateDate);
        if(getUserRoleResIdDirtyFlag())
            srfdomain.setUserRoleResId(userRoleResId);
        if(getUserRoleResNameDirtyFlag())
            srfdomain.setUserRoleResName(userRoleResName);
        if(getUserRoleNameDirtyFlag())
            srfdomain.setUserRoleName(userRoleName);
        if(getUniResNameDirtyFlag())
            srfdomain.setUniResName(uniResName);
        if(getUserRoleIdDirtyFlag())
            srfdomain.setUserRoleId(userRoleId);
        if(getUniResIdDirtyFlag())
            srfdomain.setUniResId(uniResId);

        return srfdomain;
    }

    public void fromDO(UserRoleRes srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getCreateManDirtyFlag())
            this.setCreateMan(srfdomain.getCreateMan());
        if(srfdomain.getUpdateManDirtyFlag())
            this.setUpdateMan(srfdomain.getUpdateMan());
        if(srfdomain.getEnableDirtyFlag())
            this.setEnable(srfdomain.getEnable());
        if(srfdomain.getCreateDateDirtyFlag())
            this.setCreateDate(srfdomain.getCreateDate());
        if(srfdomain.getUpdateDateDirtyFlag())
            this.setUpdateDate(srfdomain.getUpdateDate());
        if(srfdomain.getUserRoleResIdDirtyFlag())
            this.setUserRoleResId(srfdomain.getUserRoleResId());
        if(srfdomain.getUserRoleResNameDirtyFlag())
            this.setUserRoleResName(srfdomain.getUserRoleResName());
        if(srfdomain.getUserRoleNameDirtyFlag())
            this.setUserRoleName(srfdomain.getUserRoleName());
        if(srfdomain.getUniResNameDirtyFlag())
            this.setUniResName(srfdomain.getUniResName());
        if(srfdomain.getUserRoleIdDirtyFlag())
            this.setUserRoleId(srfdomain.getUserRoleId());
        if(srfdomain.getUniResIdDirtyFlag())
            this.setUniResId(srfdomain.getUniResId());

    }

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

