init
This commit is contained in:
0
api/model/__init__.py
Normal file
0
api/model/__init__.py
Normal file
20
api/model/user.py
Normal file
20
api/model/user.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from sqlalchemy import Boolean, Column, Integer, String
|
||||
|
||||
from .database import Base
|
||||
|
||||
|
||||
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})>"
|
||||
)
|
Reference in New Issue
Block a user