/*
 * 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 SysRole implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;
    private String rolename;
    private String department;

    public SysRole() {}

    public SysRole(SysRole value) {
        this.id = value.id;
        this.rolename = value.rolename;
        this.department = value.department;
    }

    public SysRole(
        String id,
        String rolename,
        String department
    ) {
        this.id = id;
        this.rolename = rolename;
        this.department = department;
    }

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

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

    /**
     * Getter for <code>yx.sys_role.rolename</code>.
     */
    public String getRolename() {
        return this.rolename;
    }

    /**
     * Setter for <code>yx.sys_role.rolename</code>.
     */
    public void setRolename(String rolename) {
        this.rolename = rolename;
    }

    /**
     * Getter for <code>yx.sys_role.department</code>.
     */
    public String getDepartment() {
        return this.department;
    }

    /**
     * Setter for <code>yx.sys_role.department</code>.
     */
    public void setDepartment(String department) {
        this.department = department;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final SysRole other = (SysRole) obj;
        if (this.id == null) {
            if (other.id != null)
                return false;
        }
        else if (!this.id.equals(other.id))
            return false;
        if (this.rolename == null) {
            if (other.rolename != null)
                return false;
        }
        else if (!this.rolename.equals(other.rolename))
            return false;
        if (this.department == null) {
            if (other.department != null)
                return false;
        }
        else if (!this.department.equals(other.department))
            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.rolename == null) ? 0 : this.rolename.hashCode());
        result = prime * result + ((this.department == null) ? 0 : this.department.hashCode());
        return result;
    }

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

        sb.append(id);
        sb.append(", ").append(rolename);
        sb.append(", ").append(department);

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