Documentation des Modèles

Ce module définit les modèles de données Pydantic et SQLAlchemy.

Modèles

ORM models for the application.

Defines the Operation table to store mathematical operations with results.

class app_api.models.models.Operation(**kwargs)[source]

Bases: Base

SQLAlchemy ORM model for a mathematical operation.

id

Primary key.

Type:

int

operation

Operation type (“add”, “sub”, “square”).

Type:

str

a

First operand.

Type:

float

b

Second operand (optional for square).

Type:

float | None

result

Computed result of the operation.

Type:

float | None

a
b
id
operation
result