| 1 |
|
| 2 |
|
| 3 |
import typing |
| 4 |
|
| 5 |
import pydantic |
| 6 |
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel |
| 7 |
|
| 8 |
|
| 9 |
class Role(UniversalBaseModel): |
| 10 |
id: typing.Optional[str] = pydantic.Field(default=None) |
| 11 |
""" |
| 12 |
ID for this role. |
| 13 |
""" |
| 14 |
|
| 15 |
name: typing.Optional[str] = pydantic.Field(default=None) |
| 16 |
""" |
| 17 |
Name of this role. |
| 18 |
""" |
| 19 |
|
| 20 |
description: typing.Optional[str] = pydantic.Field(default=None) |
| 21 |
""" |
| 22 |
Description of this role. |
| 23 |
""" |
| 24 |
|
| 25 |
if IS_PYDANTIC_V2: |
| 26 |
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) |
| 27 |
else: |
| 28 |
|
| 29 |
class Config: |
| 30 |
frozen = True |
| 31 |
smart_union = True |
| 32 |
extra = pydantic.Extra.allow |