calculator / models.py
adriiita's picture
improvements (#1)
0bbb69c verified
raw
history blame contribute delete
258 Bytes
from enum import Enum
from pydantic import BaseModel
class Operation(Enum):
ADD = "add"
SUBTRACT = "subtract"
MULTIPLY = "multiply"
DIVIDE = "divide"
class CalculationRequest(BaseModel):
operation: Operation
x: float
y: float