15 lines
461 B
Python
15 lines
461 B
Python
# 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") |