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

	private static final long serialVersionUID = 1L;

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

    @JsonIgnore
    private boolean updateManDirtyFlag;

    /**
     * 属性 [PWD]
     *
     */
    @LoginAccountPwdPwdDefault(info = "默认规则")
    private String pwd;

    @JsonIgnore
    private boolean pwdDirtyFlag;

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

    @JsonIgnore
    private boolean updateDateDirtyFlag;

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

    @JsonIgnore
    private boolean createManDirtyFlag;

    /**
     * 属性 [LOGINACCOUNTPWDNAME]
     *
     */
    @LoginAccountPwdLoginAccountPwdNameDefault(info = "默认规则")
    private String loginAccountPwdName;

    @JsonIgnore
    private boolean loginAccountPwdNameDirtyFlag;

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

    @JsonIgnore
    private boolean createDateDirtyFlag;

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

    @JsonIgnore
    private boolean enableDirtyFlag;

    /**
     * 属性 [LOGINACCOUNTPWDID]
     *
     */
    @LoginAccountPwdLoginAccountPwdIdDefault(info = "默认规则")
    private String loginAccountPwdId;

    @JsonIgnore
    private boolean loginAccountPwdIdDirtyFlag;

    /**
     * 属性 [LOGINACCOUNTID]
     *
     */
    @LoginAccountPwdLoginAccountIdDefault(info = "默认规则")
    private String loginAccountId;

    @JsonIgnore
    private boolean loginAccountIdDirtyFlag;


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

    /**
     * 获取 [PWD]
     */
    @JsonProperty("pwd")
    public String getPwd(){
        return pwd ;
    }

    /**
     * 设置 [PWD]
     */
    @JsonProperty("pwd")
    public void setPwd(String  pwd){
        this.pwd = pwd ;
        this.pwdDirtyFlag = true ;
    }

    /**
     * 获取 [PWD]脏标记
     */
    @JsonIgnore
    public boolean getPwdDirtyFlag(){
        return pwdDirtyFlag ;
    }

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

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

    /**
     * 获取 [LOGINACCOUNTPWDNAME]
     */
    @JsonProperty("loginaccountpwdname")
    public String getLoginAccountPwdName(){
        return loginAccountPwdName ;
    }

    /**
     * 设置 [LOGINACCOUNTPWDNAME]
     */
    @JsonProperty("loginaccountpwdname")
    public void setLoginAccountPwdName(String  loginAccountPwdName){
        this.loginAccountPwdName = loginAccountPwdName ;
        this.loginAccountPwdNameDirtyFlag = true ;
    }

    /**
     * 获取 [LOGINACCOUNTPWDNAME]脏标记
     */
    @JsonIgnore
    public boolean getLoginAccountPwdNameDirtyFlag(){
        return loginAccountPwdNameDirtyFlag ;
    }

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

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

    /**
     * 获取 [LOGINACCOUNTPWDID]
     */
    @JsonProperty("loginaccountpwdid")
    public String getLoginAccountPwdId(){
        return loginAccountPwdId ;
    }

    /**
     * 设置 [LOGINACCOUNTPWDID]
     */
    @JsonProperty("loginaccountpwdid")
    public void setLoginAccountPwdId(String  loginAccountPwdId){
        this.loginAccountPwdId = loginAccountPwdId ;
        this.loginAccountPwdIdDirtyFlag = true ;
    }

    /**
     * 获取 [LOGINACCOUNTPWDID]脏标记
     */
    @JsonIgnore
    public boolean getLoginAccountPwdIdDirtyFlag(){
        return loginAccountPwdIdDirtyFlag ;
    }

    /**
     * 获取 [LOGINACCOUNTID]
     */
    @JsonProperty("loginaccountid")
    public String getLoginAccountId(){
        return loginAccountId ;
    }

    /**
     * 设置 [LOGINACCOUNTID]
     */
    @JsonProperty("loginaccountid")
    public void setLoginAccountId(String  loginAccountId){
        this.loginAccountId = loginAccountId ;
        this.loginAccountIdDirtyFlag = true ;
    }

    /**
     * 获取 [LOGINACCOUNTID]脏标记
     */
    @JsonIgnore
    public boolean getLoginAccountIdDirtyFlag(){
        return loginAccountIdDirtyFlag ;
    }



    public LoginAccountPwd toDO() {
        LoginAccountPwd srfdomain = new LoginAccountPwd();
        if(getUpdateManDirtyFlag())
            srfdomain.setUpdateMan(updateMan);
        if(getPwdDirtyFlag())
            srfdomain.setPwd(pwd);
        if(getUpdateDateDirtyFlag())
            srfdomain.setUpdateDate(updateDate);
        if(getCreateManDirtyFlag())
            srfdomain.setCreateMan(createMan);
        if(getLoginAccountPwdNameDirtyFlag())
            srfdomain.setLoginAccountPwdName(loginAccountPwdName);
        if(getCreateDateDirtyFlag())
            srfdomain.setCreateDate(createDate);
        if(getEnableDirtyFlag())
            srfdomain.setEnable(enable);
        if(getLoginAccountPwdIdDirtyFlag())
            srfdomain.setLoginAccountPwdId(loginAccountPwdId);
        if(getLoginAccountIdDirtyFlag())
            srfdomain.setLoginAccountId(loginAccountId);

        return srfdomain;
    }

    public void fromDO(LoginAccountPwd srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getUpdateManDirtyFlag())
            this.setUpdateMan(srfdomain.getUpdateMan());
        if(srfdomain.getPwdDirtyFlag())
            this.setPwd(srfdomain.getPwd());
        if(srfdomain.getUpdateDateDirtyFlag())
            this.setUpdateDate(srfdomain.getUpdateDate());
        if(srfdomain.getCreateManDirtyFlag())
            this.setCreateMan(srfdomain.getCreateMan());
        if(srfdomain.getLoginAccountPwdNameDirtyFlag())
            this.setLoginAccountPwdName(srfdomain.getLoginAccountPwdName());
        if(srfdomain.getCreateDateDirtyFlag())
            this.setCreateDate(srfdomain.getCreateDate());
        if(srfdomain.getEnableDirtyFlag())
            this.setEnable(srfdomain.getEnable());
        if(srfdomain.getLoginAccountPwdIdDirtyFlag())
            this.setLoginAccountPwdId(srfdomain.getLoginAccountPwdId());
        if(srfdomain.getLoginAccountIdDirtyFlag())
            this.setLoginAccountId(srfdomain.getLoginAccountId());

    }

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

