12345678910111213141516171819202122 |
- from sqlalchemy import Integer, String, Date, Time
- from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
- from sqlalchemy.dialects.mysql.base import LONGTEXT
- from datetime import date, time
- class Base(DeclarativeBase):
- pass
- class StatusMeldung(Base):
- __tablename__ = "status_meldung"
- datum: Mapped[date] = mapped_column(Date, primary_key=True)
- kunde: Mapped[str] = mapped_column(String(50), primary_key=True)
- aufgabe: Mapped[str] = mapped_column(String(30))
- start: Mapped[time] = mapped_column(Time, primary_key=True)
- ende: Mapped[time] = mapped_column(Time)
- fehlerbericht_import: Mapped[LONGTEXT] = mapped_column(LONGTEXT, nullable=True)
- fehlerbericht: Mapped[LONGTEXT] = mapped_column(LONGTEXT, nullable=True)
- anzahl: Mapped[int] = mapped_column(Integer, default=0)
- bearbeitet: Mapped[int] = mapped_column(Integer, default=0)
- kommentar_id: Mapped[int] = mapped_column(Integer, default=0)
|