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)
shout: str = Column(String, ForeignKey("shout.slug"), comment="Liked shout slug", primary_key = True)
value: int = Column(Integer, nullable=False, comment="Value")
2021-08-23 08:02:45 +00:00
# TODO: add resolvers, debug, etc.