| 1 |
|
| 2 |
|
| 3 |
import typing |
| 4 |
|
| 5 |
import pydantic |
| 6 |
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel |
| 7 |
|
| 8 |
|
| 9 |
class DailyStats(UniversalBaseModel): |
| 10 |
date: typing.Optional[str] = pydantic.Field(default=None) |
| 11 |
""" |
| 12 |
Date these events occurred in ISO 8601 format. |
| 13 |
""" |
| 14 |
|
| 15 |
logins: typing.Optional[int] = pydantic.Field(default=None) |
| 16 |
""" |
| 17 |
Number of logins on this date. |
| 18 |
""" |
| 19 |
|
| 20 |
signups: typing.Optional[int] = pydantic.Field(default=None) |
| 21 |
""" |
| 22 |
Number of signups on this date. |
| 23 |
""" |
| 24 |
|
| 25 |
leaked_passwords: typing.Optional[int] = pydantic.Field(default=None) |
| 26 |
""" |
| 27 |
Number of breached-password detections on this date (subscription required). |
| 28 |
""" |
| 29 |
|
| 30 |
updated_at: typing.Optional[str] = pydantic.Field(default=None) |
| 31 |
""" |
| 32 |
Date and time this stats entry was last updated in ISO 8601 format. |
| 33 |
""" |
| 34 |
|
| 35 |
created_at: typing.Optional[str] = pydantic.Field(default=None) |
| 36 |
""" |
| 37 |
Approximate date and time the first event occurred in ISO 8601 format. |
| 38 |
""" |
| 39 |
|
| 40 |
if IS_PYDANTIC_V2: |
| 41 |
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) |
| 42 |
else: |
| 43 |
|
| 44 |
class Config: |
| 45 |
frozen = True |
| 46 |
smart_union = True |
| 47 |
extra = pydantic.Extra.allow |