Files
Verificacion_EFOS_Backend/app/modules/coments/schema.py
2026-04-06 16:06:31 -07:00

20 lines
491 B
Python

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