| 1 |
|
| 2 |
|
| 3 |
import datetime as dt |
| 4 |
import typing |
| 5 |
|
| 6 |
import pydantic |
| 7 |
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel |
| 8 |
from .user_enrollment_auth_method_enum import UserEnrollmentAuthMethodEnum |
| 9 |
from .user_enrollment_status_enum import UserEnrollmentStatusEnum |
| 10 |
|
| 11 |
|
| 12 |
class UsersEnrollment(UniversalBaseModel): |
| 13 |
id: typing.Optional[str] = pydantic.Field(default=None) |
| 14 |
""" |
| 15 |
ID of this enrollment. |
| 16 |
""" |
| 17 |
|
| 18 |
status: typing.Optional[UserEnrollmentStatusEnum] = None |
| 19 |
type: typing.Optional[str] = pydantic.Field(default=None) |
| 20 |
""" |
| 21 |
Type of enrollment. |
| 22 |
""" |
| 23 |
|
| 24 |
name: typing.Optional[str] = pydantic.Field(default=None) |
| 25 |
""" |
| 26 |
Name of enrollment (usually phone number). |
| 27 |
""" |
| 28 |
|
| 29 |
identifier: typing.Optional[str] = pydantic.Field(default=None) |
| 30 |
""" |
| 31 |
Device identifier (usually phone identifier) of this enrollment. |
| 32 |
""" |
| 33 |
|
| 34 |
phone_number: typing.Optional[str] = pydantic.Field(default=None) |
| 35 |
""" |
| 36 |
Phone number for this enrollment. |
| 37 |
""" |
| 38 |
|
| 39 |
auth_method: typing.Optional[UserEnrollmentAuthMethodEnum] = None |
| 40 |
enrolled_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) |
| 41 |
""" |
| 42 |
Start date and time of this enrollment. |
| 43 |
""" |
| 44 |
|
| 45 |
last_auth: typing.Optional[dt.datetime] = pydantic.Field(default=None) |
| 46 |
""" |
| 47 |
Last authentication date and time of this enrollment. |
| 48 |
""" |
| 49 |
|
| 50 |
if IS_PYDANTIC_V2: |
| 51 |
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) |
| 52 |
else: |
| 53 |
|
| 54 |
class Config: |
| 55 |
frozen = True |
| 56 |
smart_union = True |
| 57 |
extra = pydantic.Extra.allow |