core/orm/like.py

18 lines
496 B
Python
Raw Normal View History

from typing import List
from sqlalchemy import Column, Integer, String, ForeignKey, Datetime
from orm import Permission
from orm.base import Base
class Like(Base):
2021-08-23 08:02:45 +00:00
__tablename__ = 'like'
2021-08-23 08:02:45 +00:00
id: int = None
user_id: str = Column(ForeignKey("user.id"), comment="Author", primary_key = True)
2021-08-25 21:20:53 +00:00
shout_id: int = Column(Integer, ForeignKey("shout.id"), comment="Liked shout id", primary_key = True)
2021-08-23 08:02:45 +00:00
value: int = Column(Integer, nullable=False, comment="Value")
2021-08-23 08:02:45 +00:00
# TODO: add resolvers, debug, etc.