Files
student-management-system/model/advisor_model.py
T

16 lines
485 B
Python
Raw Normal View History

2026-09-18 16:53:21 +08:00
# model/advisor_model.py
# 顾问信息表模型
from sqlalchemy import Column, String, Integer
from sqlalchemy.orm import relationship
from database import Base
class AdvisorInfo(Base):
__tablename__ = "advisor_info"
id = Column(String(15), primary_key=True)
name = Column(String(20), nullable=False)
phone = Column(String(20), nullable=False)
is_deleted = Column(Integer, nullable=False, default=0)
students = relationship("StuInfo", back_populates="adv")