17 lines
616 B
Python
17 lines
616 B
Python
from __future__ import annotations
|
|
|
|
from sqlalchemy import ForeignKey, Integer, String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.db.base import Base, TimestampMixin, UUIDMixin
|
|
|
|
|
|
class Program(Base, UUIDMixin, TimestampMixin):
|
|
__tablename__ = "programs"
|
|
|
|
device_id: Mapped[str] = mapped_column(ForeignKey("devices.id"), index=True)
|
|
name: Mapped[str] = mapped_column(String(160))
|
|
temperature_celsius: Mapped[int | None] = mapped_column(Integer)
|
|
holding_time_minutes: Mapped[int | None] = mapped_column(Integer)
|
|
drying_time_minutes: Mapped[int | None] = mapped_column(Integer)
|
|
|