ajuste de cruds incompleto
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from pydantic import BaseModel, EmailStr, Field, validator
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
#
|
||||
import re
|
||||
from enum import Enum
|
||||
|
||||
class CommentCreate(BaseModel):
|
||||
texto: str = Field(..., max(380), min(30))
|
||||
user_id: Optional[int]
|
||||
feed_id: Optional[int]
|
||||
is_active: bool = True
|
||||
|
||||
class Commentupdate(CommentCreate):
|
||||
pass
|
||||
class CommentResponse(CommentCreate):
|
||||
created_at: datetime
|
||||
cretaed_by: int
|
||||
class MessageResponse(BaseModel):
|
||||
message: str
|
||||
Reference in New Issue
Block a user