feat: auth backend implementation

This commit is contained in:
2025-06-09 07:04:33 -04:00
parent eb84ff2060
commit df5b247cdd
8 changed files with 419 additions and 3 deletions
+12 -1
View File
@@ -1,4 +1,4 @@
from sqlalchemy import JSON, Column, Integer, String
from sqlalchemy import JSON, Boolean, Column, Integer, String
from .database import Base
@@ -9,3 +9,14 @@ class Item(Base):
name = Column(String, index=True)
description = Column(String, nullable=True)
body = Column(JSON, nullable=False)
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
username = Column(String, unique=True, nullable=False, index=True)
email = Column(String, unique=True, nullable=False, index=True)
hashed_password = Column(String, nullable=False)
permissions = Column(JSON, nullable=False)
subscriber = Column(Boolean, nullable=False)