package com.xpx.pojo;

import java.io.Serializable;
import java.util.List;

/**
 * @author 夏培轩
 */
public class Admin implements Serializable {

    private int id;
    private String username;
    private String password;
    private String salt;
    private int rid;

    private List<Menu> list;
    private Role role;

    public Admin() {
    }

    public Admin(int id, String username, String password, String salt, int rid, List<Menu> list, Role role) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.salt = salt;
        this.rid = rid;
        this.list = list;
        this.role = role;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    public List<Menu> getList() {
        return list;
    }

    public void setList(List<Menu> list) {
        this.list = list;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    @Override
    public String toString() {
        return "Admin{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", rid=" + rid +
                ", list=" + list +
                ", role=" + role +
                '}';
    }
}
