File size: 359 Bytes
95eee3d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from dataclasses import dataclass
from app.models.post import Post
from app.models.user import User

@dataclass
class Comment:
    id: int
    content: str
    post: Post
    user: User

    def __init__(self, id: int, content: str, post: Post, user: User):
        self.id = id
        self.content = content
        self.post = post
        self.user = user