add auth
This commit is contained in:
@@ -54,3 +54,13 @@ class Tag(Base):
|
||||
category: Mapped[str] = mapped_column(String, nullable=False)
|
||||
|
||||
items: Mapped[list["MediaItem"]] = relationship("MediaItem", secondary=media_item_tags, back_populates="tags")
|
||||
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
||||
username: Mapped[str] = mapped_column(String, nullable=False, unique=True)
|
||||
password_hash: Mapped[str] = mapped_column(String, nullable=False)
|
||||
is_admin: Mapped[bool] = mapped_column(Boolean, default=False)
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)
|
||||
|
||||
Reference in New Issue
Block a user