|
- # PostgreSQL table model for users
- from sqlalchemy import Column, Integer, String, DateTime
- from db.base import Base
-
-
- class User(Base):
- __tablename__ = "users"
- Id = Column(Integer, primary_key=True, index=True)
- Name = Column(String, nullable=False)
- MiddleName = Column(String, nullable=True)
- LastName = Column(String, nullable=False)
- BirthDate = Column(DateTime, nullable=False)
- ContactNumber = Column(String, nullable=False)
- Email = Column(String, nullable=False)
- Role = Column(String, nullable=False)
- DrivingLicenseNumber = Column(String, nullable=True)
- HashedPassword = Column(String, nullable=False)
|