25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
703 B

  1. # PostgreSQL table model for users
  2. from sqlalchemy import Column, Integer, String, DateTime, Boolean, URL
  3. from sqlalchemy.orm import relationship
  4. from db.base import Base
  5. class User(Base):
  6. __tablename__ = "users"
  7. Id = Column(Integer, primary_key=True, index=True)
  8. Name = Column(String, nullable=False)
  9. MiddleName = Column(String, nullable=True)
  10. LastName = Column(String, nullable=False)
  11. BirthDate = Column(DateTime, nullable=False)
  12. ContactNumber = Column(String, nullable=False)
  13. Email = Column(String, nullable=False)
  14. Role = Column(String, nullable=False)
  15. DrivingLicenseNumber = Column(String, nullable=True)
  16. HashedPassword = Column(String, nullable=False)