package com.miraclegarden.smsmessage.model;

import java.util.List;

public class UserInfo {
    private String id;
    private String username;
    private String role;
    private boolean isFirstLogin;
    private List<String> projectAccesses;
    private String parentUserId;
    private String googleExcelId;

    public String getId() {
        return id;
    }

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

    public String getUsername() {
        return username;
    }

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

    public String getRole() {
        return role;
    }

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

    public boolean isFirstLogin() {
        return isFirstLogin;
    }

    public void setFirstLogin(boolean firstLogin) {
        isFirstLogin = firstLogin;
    }

    public List<String> getProjectAccesses() {
        return projectAccesses;
    }

    public void setProjectAccesses(List<String> projectAccesses) {
        this.projectAccesses = projectAccesses;
    }

    public String getParentUserId() {
        return parentUserId;
    }

    public void setParentUserId(String parentUserId) {
        this.parentUserId = parentUserId;
    }

    public String getGoogleExcelId() {
        return googleExcelId;
    }

    public void setGoogleExcelId(String googleExcelId) {
        this.googleExcelId = googleExcelId;
    }

    public boolean hasProjectAccess(String projectType) {
        if (projectAccesses == null || projectAccesses.isEmpty()) {
            return false;
        }
        return projectAccesses.contains(projectType);
    }
}
