2021-06-28 09:08:09 +00:00
|
|
|
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'
|
|
|
|
|
2022-06-19 11:11:14 +00:00
|
|
|
shout: int = Column(Integer, ForeignKey("shout.id"), nullable=False, comment="Shout")
|
|
|
|
range: str = Column(String, nullable=True, comment="Range in format <start index>:<end>")
|
2021-06-28 09:08:09 +00:00
|
|
|
body: str = Column(String, nullable=False, comment="Body")
|
2022-06-19 11:11:14 +00:00
|
|
|
createdBy: int = Column(Integer, ForeignKey("user.id"), nullable=False, comment="Author")
|
2021-06-28 09:08:09 +00:00
|
|
|
createdAt: str = Column(datetime, nullable=False, comment="Created at")
|
2022-06-19 11:11:14 +00:00
|
|
|
updatedAt: str = Column(datetime, nullable=True, comment="Updated at")
|
|
|
|
acceptedAt: str = Column(datetime, nullable=True, comment="Accepted at")
|
|
|
|
acceptedBy: str = Column(datetime, nullable=True, comment="Accepted by")
|
|
|
|
deletedAt: str = Column(datetime, nullable=True, comment="Deleted at")
|
|
|
|
declinedAt: str = Column(datetime, nullable=True, comment="Declined at)
|
|
|
|
declinedBy: str = Column(datetime, nullable=True, comment="Declined by")
|
2021-06-28 09:08:09 +00:00
|
|
|
# TODO: debug, logix
|