Program/mooc/models/mobile_number.py
?..濡.. 0e27355932 Refactor models and schemas for improved consistency and functionality
- 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.
2025-01-09 06:43:18 +08:00

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