wip: redis, sqlalchemy, structured, etc

This commit is contained in:
2021-06-28 12:08:09 +03:00
parent 133e1cd490
commit 9f01572557
37 changed files with 1297 additions and 62 deletions

18
orm/proposal.py Normal file
View File

@@ -0,0 +1,18 @@
from typing import List
from datetime import datetime
from sqlalchemy import Column, Integer, String, ForeignKey, Datetime
from orm import Permission
from orm.base import Base
class Proposal(Base):
__tablename__ = 'proposal'
author_id: str = Column(ForeignKey("user.id"), nullable=False, comment="Author")
body: str = Column(String, nullable=False, comment="Body")
createdAt: str = Column(datetime, nullable=False, comment="Created at")
shout: str = Column(ForeignKey("shout.id"), nullable=False, comment="Updated at")
range: str = Column(String, nullable=True, comment="Range in format <start index>:<end>")
# TODO: debug, logix