package com.tenlionsoft.baselib.core.beans;

import com.contrarywind.interfaces.IPickerViewData;

import org.jetbrains.annotations.NotNull;

import java.util.List;

import androidx.annotation.NonNull;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: UserInfo
 * @Description:
 * @Author: WangGeng
 * @Date: 2019-08-02 11:20
 * @Version: 1.0
 **/
public class AppTokenUser {

    /**
     * phone : 18888888888
     * roles : [{"apiDeleteMenu":[],"apiQueryMenu":[],"apiSaveMenu":[],"apiUpdateMenu":[],"resourceDeleteMenu":[],"resourceQueryMenu":[],"resourceSaveMenu":[],"resourceUpdateMenu":[],"roleId":"e483f019-d971-49ac-b5fa-3314220da703","roleName":"片长","routeQueryMenu":[],"routeSaveMenu":[],"routeUpdateMenu":[]}]
     * tokenSign : CM_Token_1565413634905
     * name : 张三
     * id : 5e015132-2719-460d-880a-bc6912ea4a8d
     * avatar :
     * email : 888@888.com
     * username : zhangsan
     */

    private String phone;
    private String tokenSign;
    private String name;
    private String id;
    private String avatar;
    private String email;
    private String username;
    private List<RolesBean> roles;
    private List<DepBean> departments;

    public List<DepBean> getDepartments() {
        return departments;
    }

    public void setDepartments(List<DepBean> departments) {
        this.departments = departments;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getTokenSign() {
        return tokenSign;
    }

    public void setTokenSign(String tokenSign) {
        this.tokenSign = tokenSign;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

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

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUsername() {
        return username;
    }

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

    public List<RolesBean> getRoles() {
        return roles;
    }

    public void setRoles(List<RolesBean> roles) {
        this.roles = roles;
    }

    public static class DepBean implements IPickerViewData {
        private String departmentName;
        private String departmentId;

        public String getDepartmentName() {
            return departmentName;
        }

        public void setDepartmentName(String departmentName) {
            this.departmentName = departmentName;
        }

        public String getDepartmentId() {
            return departmentId;
        }

        public void setDepartmentId(String departmentId) {
            this.departmentId = departmentId;
        }

        @Override
        public String getPickerViewText() {
            return departmentName;
        }

        @Override
        public String toString() {
            return "DepBean{" +
                "departmentName='" + departmentName + '\'' +
                ", departmentId='" + departmentId + '\'' +
                '}';
        }
    }

    public static class RolesBean {
        /**
         * roleId : e483f019-d971-49ac-b5fa-3314220da703
         * roleName : 片长
         */

        private String roleId;
        private String roleName;

        @Override
        public String toString() {
            return "RolesBean{" +
                "roleId='" + roleId + '\'' +
                ", roleName='" + roleName + '\'' +
                '}';
        }

        public String getRoleId() {
            return roleId;
        }

        public void setRoleId(String roleId) {
            this.roleId = roleId;
        }

        public String getRoleName() {
            return roleName;
        }

        public void setRoleName(String roleName) {
            this.roleName = roleName;
        }
    }
}
