16 lines
292 B
Python
16 lines
292 B
Python
from typing import Annotated
|
|
|
|
from pydantic import ConfigDict, Field
|
|
|
|
Macronutrient = Annotated[float, Field(ge=0)]
|
|
Calories = Annotated[float, Field(ge=0)]
|
|
|
|
|
|
class ObjModelMixin:
|
|
"""
|
|
Shared code for ObjModel.
|
|
"""
|
|
|
|
id: int
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|