sentiment_analyzer / schemas.py
xclasscode's picture
Update schemas.py
7618583
raw
history blame
402 Bytes
from pydantic import BaseModel
from datetime import datetime
class SentimentResultBase(BaseModel):
positive_score: float
negative_score: float
neutral_score: float
class SentimentResultCreate(SentimentResultBase):
pass
class SentimentResult(SentimentResultBase):
id: int
created_at: datetime
user_id: int
text_id: int
class Config:
from_attributes = True