service_man/api/model/user.py

21 lines
534 B
Python
Raw Normal View History

2024-03-04 07:12:29 +03:00
from sqlalchemy import Boolean, Column, Integer, String
2024-03-04 13:15:28 +03:00
from api.uow.database import Base
2024-03-04 07:12:29 +03:00
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
email = Column(String, unique=True)
hashed_password = Column(String)
is_active = Column(Boolean, default=True)
def __repr__(self):
return (
f"<User(id={self.id}, "
f'email="{self.email}", '
f'hashed_password="{self.hashed_password}", '
f"is_active={self.is_active})>"
)