16 lines
591 B
Python
16 lines
591 B
Python
from sqlalchemy import String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.core.database import Base
|
|
|
|
|
|
class ImportedPartConfig(Base):
|
|
"""Singleton (id=1) storing the OData source URL and credentials."""
|
|
|
|
__tablename__ = "imported_part_config"
|
|
|
|
id: Mapped[int] = mapped_column(primary_key=True, default=1)
|
|
odata_url: Mapped[str | None] = mapped_column(String, nullable=True, default=None)
|
|
username: Mapped[str | None] = mapped_column(String, nullable=True, default=None)
|
|
password: Mapped[str | None] = mapped_column(String, nullable=True, default=None)
|