from pydantic import BaseModel
from typing import List, Optional


class RoleEntity(BaseModel):
    id: Optional[int] = None
    name: str
    users: Optional[List[int]] = None

    class Config:
        from_attributes = True
