/*
 * This file is generated by jOOQ.
 */
package jj.tech.paolu.repository.jooq.tables.pojos;


import java.io.Serializable;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
public class SysAdmin implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;
    private String orgId;
    private Integer type;
    private String realname;
    private String username;
    private String password;
    private Integer islock;

    public SysAdmin() {}

    public SysAdmin(SysAdmin value) {
        this.id = value.id;
        this.orgId = value.orgId;
        this.type = value.type;
        this.realname = value.realname;
        this.username = value.username;
        this.password = value.password;
        this.islock = value.islock;
    }

    public SysAdmin(
        String id,
        String orgId,
        Integer type,
        String realname,
        String username,
        String password,
        Integer islock
    ) {
        this.id = id;
        this.orgId = orgId;
        this.type = type;
        this.realname = realname;
        this.username = username;
        this.password = password;
        this.islock = islock;
    }

    /**
     * Getter for <code>yx.sys_admin.id</code>.
     */
    public String getId() {
        return this.id;
    }

    /**
     * Setter for <code>yx.sys_admin.id</code>.
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Getter for <code>yx.sys_admin.org_id</code>.
     */
    public String getOrgId() {
        return this.orgId;
    }

    /**
     * Setter for <code>yx.sys_admin.org_id</code>.
     */
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    /**
     * Getter for <code>yx.sys_admin.type</code>. 0管理员,1普通用户
     */
    public Integer getType() {
        return this.type;
    }

    /**
     * Setter for <code>yx.sys_admin.type</code>. 0管理员,1普通用户
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * Getter for <code>yx.sys_admin.realname</code>.
     */
    public String getRealname() {
        return this.realname;
    }

    /**
     * Setter for <code>yx.sys_admin.realname</code>.
     */
    public void setRealname(String realname) {
        this.realname = realname;
    }

    /**
     * Getter for <code>yx.sys_admin.username</code>.
     */
    public String getUsername() {
        return this.username;
    }

    /**
     * Setter for <code>yx.sys_admin.username</code>.
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * Getter for <code>yx.sys_admin.password</code>. sha3_256hex
     */
    public String getPassword() {
        return this.password;
    }

    /**
     * Setter for <code>yx.sys_admin.password</code>. sha3_256hex
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * Getter for <code>yx.sys_admin.islock</code>. 0正常,1锁定
     */
    public Integer getIslock() {
        return this.islock;
    }

    /**
     * Setter for <code>yx.sys_admin.islock</code>. 0正常,1锁定
     */
    public void setIslock(Integer islock) {
        this.islock = islock;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final SysAdmin other = (SysAdmin) obj;
        if (this.id == null) {
            if (other.id != null)
                return false;
        }
        else if (!this.id.equals(other.id))
            return false;
        if (this.orgId == null) {
            if (other.orgId != null)
                return false;
        }
        else if (!this.orgId.equals(other.orgId))
            return false;
        if (this.type == null) {
            if (other.type != null)
                return false;
        }
        else if (!this.type.equals(other.type))
            return false;
        if (this.realname == null) {
            if (other.realname != null)
                return false;
        }
        else if (!this.realname.equals(other.realname))
            return false;
        if (this.username == null) {
            if (other.username != null)
                return false;
        }
        else if (!this.username.equals(other.username))
            return false;
        if (this.password == null) {
            if (other.password != null)
                return false;
        }
        else if (!this.password.equals(other.password))
            return false;
        if (this.islock == null) {
            if (other.islock != null)
                return false;
        }
        else if (!this.islock.equals(other.islock))
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
        result = prime * result + ((this.orgId == null) ? 0 : this.orgId.hashCode());
        result = prime * result + ((this.type == null) ? 0 : this.type.hashCode());
        result = prime * result + ((this.realname == null) ? 0 : this.realname.hashCode());
        result = prime * result + ((this.username == null) ? 0 : this.username.hashCode());
        result = prime * result + ((this.password == null) ? 0 : this.password.hashCode());
        result = prime * result + ((this.islock == null) ? 0 : this.islock.hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("SysAdmin (");

        sb.append(id);
        sb.append(", ").append(orgId);
        sb.append(", ").append(type);
        sb.append(", ").append(realname);
        sb.append(", ").append(username);
        sb.append(", ").append(password);
        sb.append(", ").append(islock);

        sb.append(")");
        return sb.toString();
    }
}
