File size: 533 Bytes
8450c71 68ce4db 8450c71 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import asyncio
import orm
import psycopg2
import datetime
import pydantic
from App.modelInit import database, models
from App.Users.Model import User
from App.Post.Model import Post
class CommentLike(orm.Model):
tablename = "commentlikes"
registry = models
fields = {
"id": orm.Integer(primary_key=True),
"user": orm.ForeignKey(User, on_delete=orm.CASCADE),
"post": orm.ForeignKey(Post, on_delete=orm.CASCADE),
"createdAt": orm.DateTime(index=True, default=datetime.datetime.now),
}
|