news & things
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String, DateTime
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
from sqlalchemy.orm import relationship
|
||||
import uuid
|
||||
import datetime
|
||||
|
||||
from .database import Base
|
||||
|
||||
@ -18,6 +19,15 @@ class User(Base):
|
||||
owns_queues = relationship("Queue", backref="owner", lazy="dynamic")
|
||||
|
||||
|
||||
class News(Base):
|
||||
__tablename__ = "news"
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
title = Column(String)
|
||||
content = Column(String)
|
||||
created = Column(DateTime, default=datetime.datetime.utcnow)
|
||||
|
||||
|
||||
class AnonymousUser(Base):
|
||||
__tablename__ = "anonymoususers"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user