core/orm/like.py
2021-08-23 11:02:45 +03:00

18 lines
496 B
Python

from typing import List
from sqlalchemy import Column, Integer, String, ForeignKey, Datetime
from orm import Permission
from orm.base import Base
class Like(Base):
__tablename__ = 'like'
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")
# TODO: add resolvers, debug, etc.