backend for queues & minor front tweaks

This commit is contained in:
2024-04-11 16:39:08 +03:00
parent 8b8124d58d
commit 57965fc147
21 changed files with 210 additions and 35 deletions

View File

@ -14,3 +14,21 @@ class User(Base):
username = Column(String(length=24), unique=True, index=True)
hashed_password = Column(String)
is_active = Column(Boolean, default=True)
owns_queues = relationship("Queue", backref="owner", lazy="dynamic")
class AnonymousUser(Base):
__tablename__ = "anonymoususers"
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
name = Column(String, index=True)
class Queue(Base):
__tablename__ = "queues"
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
name = Column(String, index=True)
description = Column(String, index=True)
owner_id = Column(UUID(as_uuid=True), ForeignKey("users.id"))