16 lines
366 B
Python
16 lines
366 B
Python
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from fooder.domain.base import Base, CommonMixin
|
|
|
|
|
|
class Product(Base, CommonMixin):
|
|
"""Product."""
|
|
|
|
name: Mapped[str]
|
|
|
|
protein: Mapped[float]
|
|
carb: Mapped[float]
|
|
fat: Mapped[float]
|
|
fiber: Mapped[float]
|
|
calories: Mapped[float]
|
|
barcode: Mapped[str | None] = mapped_column(unique=True)
|