package ru.myitschool.work.api.main

import com.google.gson.annotations.SerializedName

data class UserInfo(
    @SerializedName("id") val id: Int,
    @SerializedName("login") val login: String,
    @SerializedName("name") val name: String,
    @SerializedName("photo") val photoUrl: String,
    @SerializedName("position") val position: String,
    @SerializedName("lastVisit") val lastVisit: String,
    @SerializedName("authority") val authority: List<AuthorityData>
)

data class AuthorityData(
    @SerializedName("id") val id: Int,
    @SerializedName("authority") val authority: String,
)

object Authorities {
    const val ROLE_ADMIN = "ROLE_ADMIN"
    const val ROLE_USER = "ROLE_USER"
    const val ROLE_BLOCK = "ROLE_BLOCK"
}