szolgáltatók beálltásai, szerkesztése , létrehozása
This commit is contained in:
@@ -62,6 +62,7 @@ class UserStats(Base):
|
||||
penalty_quota_remaining: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
|
||||
places_discovered: Mapped[int] = mapped_column(Integer, default=0, server_default=text("0"))
|
||||
places_validated: Mapped[int] = mapped_column(Integer, default=0, server_default=text("0"))
|
||||
providers_added_count: Mapped[int] = mapped_column(Integer, default=0, server_default=text("0"))
|
||||
banned_until: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True)
|
||||
|
||||
updated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
|
||||
@@ -115,6 +115,22 @@ class Organization(Base):
|
||||
server_default=text("'{\"theme\": \"default\", \"primary_color\": null, \"wall_logo_url\": null}'::jsonb")
|
||||
)
|
||||
|
||||
# --- 🔍 CROWDSOURCED SEARCH FIELDS ---
|
||||
# Provider nicknames / alternative names for matching (e.g. ["MOL", "MOL LUB", "MOL Magyarország"])
|
||||
aliases: Mapped[list] = mapped_column(
|
||||
JSONB,
|
||||
nullable=False,
|
||||
default=list,
|
||||
server_default=text("'[]'::jsonb")
|
||||
)
|
||||
# Crowdsourced evaluation characteristics / tags (e.g. ["gyors", "megbízható", "kedvező ár"])
|
||||
tags: Mapped[list] = mapped_column(
|
||||
JSONB,
|
||||
nullable=False,
|
||||
default=list,
|
||||
server_default=text("'[]'::jsonb")
|
||||
)
|
||||
|
||||
# A technikai tulajdonos (User fiók - törölhető)
|
||||
owner_id: Mapped[Optional[int]] = mapped_column(Integer, ForeignKey("identity.users.id"))
|
||||
|
||||
|
||||
@@ -125,6 +125,10 @@ class Asset(Base):
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
|
||||
updated_at: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), onupdate=func.now())
|
||||
|
||||
# === WARRANTY ===
|
||||
is_under_warranty: Mapped[bool] = mapped_column(Boolean, default=False, server_default=text('false'))
|
||||
warranty_expiry_date: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True)
|
||||
|
||||
# === SALES MODULE ===
|
||||
is_for_sale: Mapped[bool] = mapped_column(Boolean, default=False, index=True)
|
||||
price: Mapped[Optional[float]] = mapped_column(Numeric(15, 2))
|
||||
|
||||
Reference in New Issue
Block a user