This commit is contained in:
parent
474d2091c6
commit
fcd6a2778b
|
@ -7,21 +7,23 @@ from services.db import Base
|
||||||
|
|
||||||
|
|
||||||
class ReactionKind(Enumeration):
|
class ReactionKind(Enumeration):
|
||||||
|
# TYPE = <reaction index> # rating diff
|
||||||
|
|
||||||
|
# editor mode
|
||||||
AGREE = 1 # +1
|
AGREE = 1 # +1
|
||||||
DISAGREE = 2 # -1
|
DISAGREE = 2 # -1
|
||||||
PROOF = 3 # +1
|
ASK = 3 # +0
|
||||||
DISPROOF = 4 # -1
|
PROPOSE = 4 # +0
|
||||||
ASK = 5 # +0
|
PROOF = 5 # +1
|
||||||
PROPOSE = 6 # +0
|
DISPROOF = 6 # -1
|
||||||
QUOTE = 7 # +0 bookmark
|
ACCEPT = 7 # +1
|
||||||
COMMENT = 8 # +0
|
REJECT = 8 # -1
|
||||||
ACCEPT = 9 # +1
|
|
||||||
REJECT = 0 # -1
|
# public feed
|
||||||
|
QUOTE = 9 # +0 bookmark
|
||||||
|
COMMENT = 0 # +0
|
||||||
LIKE = 11 # +1
|
LIKE = 11 # +1
|
||||||
DISLIKE = 12 # -1
|
DISLIKE = 12 # -1
|
||||||
REMARK = 13 # 0
|
|
||||||
FOOTNOTE = 14 # 0
|
|
||||||
# TYPE = <reaction index> # rating diff
|
|
||||||
|
|
||||||
|
|
||||||
class Reaction(Base):
|
class Reaction(Base):
|
||||||
|
@ -35,7 +37,7 @@ class Reaction(Base):
|
||||||
deleted_by = Column(ForeignKey("author.id"), nullable=True, index=True)
|
deleted_by = Column(ForeignKey("author.id"), nullable=True, index=True)
|
||||||
shout = Column(ForeignKey("shout.id"), nullable=False, index=True)
|
shout = Column(ForeignKey("shout.id"), nullable=False, index=True)
|
||||||
reply_to = Column(ForeignKey("reaction.id"), nullable=True)
|
reply_to = Column(ForeignKey("reaction.id"), nullable=True)
|
||||||
range = Column(String, nullable=True, comment="<start index>:<end>")
|
quote = Column(String, nullable=True, comment="Original quoted text")
|
||||||
kind = Column(Enum(ReactionKind), nullable=False)
|
kind = Column(Enum(ReactionKind), nullable=False)
|
||||||
|
|
||||||
oid = Column(String)
|
oid = Column(String)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user