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

	private static final long serialVersionUID = 1L;

    /**
     * 属性 [CONFIRMPWD]
     *
     */
    @LoginAccountConfirmpwdDefault(info = "默认规则")
    private String confirmpwd;

    @JsonIgnore
    private boolean confirmpwdDirtyFlag;

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

    @JsonIgnore
    private boolean updateDateDirtyFlag;

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

    @JsonIgnore
    private boolean loginAccountIdDirtyFlag;

    /**
     * 属性 [PWD]
     *
     */
    @LoginAccountPwdValueRule(info = "密码值规则")
    @LoginAccountPwdDefault(info = "默认规则")
    private String pwd;

    @JsonIgnore
    private boolean pwdDirtyFlag;

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

    @JsonIgnore
    private boolean createDateDirtyFlag;

    /**
     * 属性 [PWDCHANGED]
     *
     */
    @LoginAccountPwdChangedDefault(info = "默认规则")
    private String pwdChanged;

    @JsonIgnore
    private boolean pwdChangedDirtyFlag;

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

    @JsonIgnore
    private boolean lastPwfChgTimeDirtyFlag;

    /**
     * 属性 [LOGINACCOUNTNAME]
     *
     */
    @LoginAccountLoginAccountNameDefault(info = "默认规则")
    private String loginAccountName;

    @JsonIgnore
    private boolean loginAccountNameDirtyFlag;

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

    @JsonIgnore
    private boolean createManDirtyFlag;

    /**
     * 属性 [ISSUPERUSER]
     *
     */
    @LoginAccountIsSuperUserDefault(info = "默认规则")
    private String isSuperUser;

    @JsonIgnore
    private boolean isSuperUserDirtyFlag;

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

    @JsonIgnore
    private boolean enableDirtyFlag;

    /**
     * 属性 [LASTPWDCHGMAN]
     *
     */
    @LoginAccountLastpwdchgmanDefault(info = "默认规则")
    private String lastpwdchgman;

    @JsonIgnore
    private boolean lastpwdchgmanDirtyFlag;

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

    @JsonIgnore
    private boolean updateManDirtyFlag;

    /**
     * 属性 [OLDPWD]
     *
     */
    @LoginAccountOldPwdDefault(info = "默认规则")
    private String oldPwd;

    @JsonIgnore
    private boolean oldPwdDirtyFlag;

    /**
     * 属性 [USERNAME]
     *
     */
    @LoginAccountUserNameDefault(info = "默认规则")
    private String userName;

    @JsonIgnore
    private boolean userNameDirtyFlag;

    /**
     * 属性 [USERID]
     *
     */
    @LoginAccountUserIdDefault(info = "默认规则")
    private String userId;

    @JsonIgnore
    private boolean userIdDirtyFlag;


    /**
     * 获取 [CONFIRMPWD]
     */
    @JsonProperty("confirmpwd")
    public String getConfirmpwd(){
        return confirmpwd ;
    }

    /**
     * 设置 [CONFIRMPWD]
     */
    @JsonProperty("confirmpwd")
    public void setConfirmpwd(String  confirmpwd){
        this.confirmpwd = confirmpwd ;
        this.confirmpwdDirtyFlag = true ;
    }

    /**
     * 获取 [CONFIRMPWD]脏标记
     */
    @JsonIgnore
    public boolean getConfirmpwdDirtyFlag(){
        return confirmpwdDirtyFlag ;
    }

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

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

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

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

    /**
     * 获取 [PWDCHANGED]
     */
    @JsonProperty("pwdchanged")
    public String getPwdChanged(){
        return pwdChanged ;
    }

    /**
     * 设置 [PWDCHANGED]
     */
    @JsonProperty("pwdchanged")
    public void setPwdChanged(String  pwdChanged){
        this.pwdChanged = pwdChanged ;
        this.pwdChangedDirtyFlag = true ;
    }

    /**
     * 获取 [PWDCHANGED]脏标记
     */
    @JsonIgnore
    public boolean getPwdChangedDirtyFlag(){
        return pwdChangedDirtyFlag ;
    }

    /**
     * 获取 [LASTPWDCHGTIME]
     */
    @JsonProperty("lastpwfchgtime")
    public Timestamp getLastPwfChgTime(){
        return lastPwfChgTime ;
    }

    /**
     * 设置 [LASTPWDCHGTIME]
     */
    @JsonProperty("lastpwfchgtime")
    public void setLastPwfChgTime(Timestamp  lastPwfChgTime){
        this.lastPwfChgTime = lastPwfChgTime ;
        this.lastPwfChgTimeDirtyFlag = true ;
    }

    /**
     * 获取 [LASTPWDCHGTIME]脏标记
     */
    @JsonIgnore
    public boolean getLastPwfChgTimeDirtyFlag(){
        return lastPwfChgTimeDirtyFlag ;
    }

    /**
     * 获取 [LOGINACCOUNTNAME]
     */
    @JsonProperty("loginaccountname")
    public String getLoginAccountName(){
        return loginAccountName ;
    }

    /**
     * 设置 [LOGINACCOUNTNAME]
     */
    @JsonProperty("loginaccountname")
    public void setLoginAccountName(String  loginAccountName){
        this.loginAccountName = loginAccountName ;
        this.loginAccountNameDirtyFlag = true ;
    }

    /**
     * 获取 [LOGINACCOUNTNAME]脏标记
     */
    @JsonIgnore
    public boolean getLoginAccountNameDirtyFlag(){
        return loginAccountNameDirtyFlag ;
    }

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

    /**
     * 获取 [ISSUPERUSER]
     */
    @JsonProperty("issuperuser")
    public String getIsSuperUser(){
        return isSuperUser ;
    }

    /**
     * 设置 [ISSUPERUSER]
     */
    @JsonProperty("issuperuser")
    public void setIsSuperUser(String  isSuperUser){
        this.isSuperUser = isSuperUser ;
        this.isSuperUserDirtyFlag = true ;
    }

    /**
     * 获取 [ISSUPERUSER]脏标记
     */
    @JsonIgnore
    public boolean getIsSuperUserDirtyFlag(){
        return isSuperUserDirtyFlag ;
    }

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

    /**
     * 获取 [LASTPWDCHGMAN]
     */
    @JsonProperty("lastpwdchgman")
    public String getLastpwdchgman(){
        return lastpwdchgman ;
    }

    /**
     * 设置 [LASTPWDCHGMAN]
     */
    @JsonProperty("lastpwdchgman")
    public void setLastpwdchgman(String  lastpwdchgman){
        this.lastpwdchgman = lastpwdchgman ;
        this.lastpwdchgmanDirtyFlag = true ;
    }

    /**
     * 获取 [LASTPWDCHGMAN]脏标记
     */
    @JsonIgnore
    public boolean getLastpwdchgmanDirtyFlag(){
        return lastpwdchgmanDirtyFlag ;
    }

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

    /**
     * 获取 [OLDPWD]
     */
    @JsonProperty("oldpwd")
    public String getOldPwd(){
        return oldPwd ;
    }

    /**
     * 设置 [OLDPWD]
     */
    @JsonProperty("oldpwd")
    public void setOldPwd(String  oldPwd){
        this.oldPwd = oldPwd ;
        this.oldPwdDirtyFlag = true ;
    }

    /**
     * 获取 [OLDPWD]脏标记
     */
    @JsonIgnore
    public boolean getOldPwdDirtyFlag(){
        return oldPwdDirtyFlag ;
    }

    /**
     * 获取 [USERNAME]
     */
    @JsonProperty("username")
    public String getUserName(){
        return userName ;
    }

    /**
     * 设置 [USERNAME]
     */
    @JsonProperty("username")
    public void setUserName(String  userName){
        this.userName = userName ;
        this.userNameDirtyFlag = true ;
    }

    /**
     * 获取 [USERNAME]脏标记
     */
    @JsonIgnore
    public boolean getUserNameDirtyFlag(){
        return userNameDirtyFlag ;
    }

    /**
     * 获取 [USERID]
     */
    @JsonProperty("userid")
    public String getUserId(){
        return userId ;
    }

    /**
     * 设置 [USERID]
     */
    @JsonProperty("userid")
    public void setUserId(String  userId){
        this.userId = userId ;
        this.userIdDirtyFlag = true ;
    }

    /**
     * 获取 [USERID]脏标记
     */
    @JsonIgnore
    public boolean getUserIdDirtyFlag(){
        return userIdDirtyFlag ;
    }



    public LoginAccount toDO() {
        LoginAccount srfdomain = new LoginAccount();
        if(getConfirmpwdDirtyFlag())
            srfdomain.setConfirmpwd(confirmpwd);
        if(getUpdateDateDirtyFlag())
            srfdomain.setUpdateDate(updateDate);
        if(getLoginAccountIdDirtyFlag())
            srfdomain.setLoginAccountId(loginAccountId);
        if(getPwdDirtyFlag())
            srfdomain.setPwd(pwd);
        if(getCreateDateDirtyFlag())
            srfdomain.setCreateDate(createDate);
        if(getPwdChangedDirtyFlag())
            srfdomain.setPwdChanged(pwdChanged);
        if(getLastPwfChgTimeDirtyFlag())
            srfdomain.setLastPwfChgTime(lastPwfChgTime);
        if(getLoginAccountNameDirtyFlag())
            srfdomain.setLoginAccountName(loginAccountName);
        if(getCreateManDirtyFlag())
            srfdomain.setCreateMan(createMan);
        if(getIsSuperUserDirtyFlag())
            srfdomain.setIsSuperUser(isSuperUser);
        if(getEnableDirtyFlag())
            srfdomain.setEnable(enable);
        if(getLastpwdchgmanDirtyFlag())
            srfdomain.setLastpwdchgman(lastpwdchgman);
        if(getUpdateManDirtyFlag())
            srfdomain.setUpdateMan(updateMan);
        if(getOldPwdDirtyFlag())
            srfdomain.setOldPwd(oldPwd);
        if(getUserNameDirtyFlag())
            srfdomain.setUserName(userName);
        if(getUserIdDirtyFlag())
            srfdomain.setUserId(userId);

        return srfdomain;
    }

    public void fromDO(LoginAccount srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getConfirmpwdDirtyFlag())
            this.setConfirmpwd(srfdomain.getConfirmpwd());
        if(srfdomain.getUpdateDateDirtyFlag())
            this.setUpdateDate(srfdomain.getUpdateDate());
        if(srfdomain.getLoginAccountIdDirtyFlag())
            this.setLoginAccountId(srfdomain.getLoginAccountId());
        if(srfdomain.getPwdDirtyFlag())
            this.setPwd(srfdomain.getPwd());
        if(srfdomain.getCreateDateDirtyFlag())
            this.setCreateDate(srfdomain.getCreateDate());
        if(srfdomain.getPwdChangedDirtyFlag())
            this.setPwdChanged(srfdomain.getPwdChanged());
        if(srfdomain.getLastPwfChgTimeDirtyFlag())
            this.setLastPwfChgTime(srfdomain.getLastPwfChgTime());
        if(srfdomain.getLoginAccountNameDirtyFlag())
            this.setLoginAccountName(srfdomain.getLoginAccountName());
        if(srfdomain.getCreateManDirtyFlag())
            this.setCreateMan(srfdomain.getCreateMan());
        if(srfdomain.getIsSuperUserDirtyFlag())
            this.setIsSuperUser(srfdomain.getIsSuperUser());
        if(srfdomain.getEnableDirtyFlag())
            this.setEnable(srfdomain.getEnable());
        if(srfdomain.getLastpwdchgmanDirtyFlag())
            this.setLastpwdchgman(srfdomain.getLastpwdchgman());
        if(srfdomain.getUpdateManDirtyFlag())
            this.setUpdateMan(srfdomain.getUpdateMan());
        if(srfdomain.getOldPwdDirtyFlag())
            this.setOldPwd(srfdomain.getOldPwd());
        if(srfdomain.getUserNameDirtyFlag())
            this.setUserName(srfdomain.getUserName());
        if(srfdomain.getUserIdDirtyFlag())
            this.setUserId(srfdomain.getUserId());

    }

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

