user.py 363 B

123456789101112
  1. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String, BigInteger
  2. from sqlalchemy.orm import relationship
  3. from db.session import Base
  4. class User(Base):
  5. __tablename__ = 'user'
  6. id = Column(Integer, primary_key=True, index=True, name="user_id")
  7. avatar = Column(String)
  8. nickname = Column(String)
  9. message = relationship("Message")