
- Updated import statements in `mooc/models/__init__.py` to use parentheses for clarity. - Refactored `mooc/models/core.py` to replace `UnsignedInteger` with `INTEGER(unsigned=True)` for better compatibility. - Introduced new `MobileNumber` model in `mooc/models/mobile_number.py` with appropriate fields. - Added `ProfileFields` model in `mooc/models/profile_fields.py` with detailed attributes. - Updated schemas in `mooc/schemas/mobile_number.py` and `mooc/schemas/profile_fields.py` to reflect model changes and improve naming conventions. - Ensured all models and schemas are consistent with naming and data types.
18 lines
286 B
Python
18 lines
286 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class MobileNumberBase(BaseModel):
|
|
rid: int
|
|
enabled: int
|
|
dateline: int | None = None
|
|
|
|
|
|
class MobileNumberCreate(MobileNumberBase):
|
|
pass
|
|
|
|
|
|
class MobileNumber(MobileNumberBase):
|
|
id: int
|
|
|
|
class Config:
|
|
from_attributes = True |