Set up basic user user endpoints
This commit is contained in:
13
models.py
Normal file
13
models.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from sqlalchemy import Column, Integer, String, Boolean
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
name = Column(String, index=True)
|
||||
email = Column(String, nullable=True)
|
||||
password = Column(String)
|
||||
is_admin = Column(Boolean, default=False)
|
||||
Reference in New Issue
Block a user