
- 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.
15 lines
429 B
Python
15 lines
429 B
Python
from sqlalchemy import Column, Integer
|
|
from sqlalchemy.dialects.mysql import TINYINT
|
|
from mooc.db.database import Base
|
|
|
|
|
|
class MobileNumber(Base):
|
|
__tablename__ = "ims_mobilenumber"
|
|
|
|
id = Column(Integer, primary_key=True)
|
|
rid = Column(Integer, nullable=False)
|
|
enabled = Column(TINYINT(unsigned=True), nullable=False)
|
|
dateline = Column(Integer, nullable=True)
|
|
|
|
class Config:
|
|
from_attributes = True |