forked from microsoft/github-copilot-vibe-coding-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
39 lines (32 loc) · 709 Bytes
/
Copy pathmodels.py
File metadata and controls
39 lines (32 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from pydantic import BaseModel, Field
from typing import Optional
from datetime import datetime
class Post(BaseModel):
id: str
username: str
content: str
createdAt: str
updatedAt: str
likes: int
comments: int
class PostCreateRequest(BaseModel):
username: str
content: str
class PostUpdateRequest(BaseModel):
username: str
content: str
class Comment(BaseModel):
id: str
postId: str
username: str
content: str
createdAt: str
updatedAt: str
class CommentCreateRequest(BaseModel):
username: str
content: str
class CommentUpdateRequest(BaseModel):
username: str
content: str
class LikeRequest(BaseModel):
username: str