create project
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
from sqlalchemy import Column, Integer, String, Boolean
|
||||
from app.db import Base
|
||||
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
email = Column(String, unique=True, index=True, nullable=False)
|
||||
hashed_password = Column(String, nullable=False)
|
||||
is_active = Column(Boolean(), default=True)
|
||||
role = Column(String, default="user") # roles: "user", "admin"
|
||||
|
||||
Reference in New Issue
Block a user