27 lines
519 B
Python
27 lines
519 B
Python
from pydantic import BaseModel, EmailStr, Field, validator
|
|
from datetime import datetime, date
|
|
from typing import Optional
|
|
#
|
|
import re
|
|
from enum import Enum
|
|
|
|
|
|
class Interacction(Enum):
|
|
LIKE = "like"
|
|
DONT_LIKE = "dont_like"
|
|
APPROVED = "approved"
|
|
DISAPRROVE = "disapproved"
|
|
NONE = "none"
|
|
|
|
|
|
class InteractionBase(BaseModel):
|
|
type_interactions: Interacction = "none"
|
|
|
|
class InteractionCreate(InteractionBase):
|
|
feed_id: int
|
|
user_id: int
|
|
|
|
class InteractionResponse(InteractionBase):
|
|
pass
|
|
|