feat(T04): Rentman integration – equipment sync, API endpoints, frontend updates
- Update equipment model with Rentman-compatible fields - Add/Update equipment router endpoints for sync operations - Enhance rentman_service with full API client logic - Improve sync_service for bidirectional equipment sync - Update docker-compose with Rentman env vars - Update frontend useApi composable and nuxt config - Update mietkatalog pages with Rentman-integrated data display - Add images/ to .gitignore (binary assets, 36MB)
This commit is contained in:
@@ -15,12 +15,20 @@ class EquipmentCache(Base):
|
||||
description = Column(Text)
|
||||
specifications = Column(JSON)
|
||||
images = Column(JSON)
|
||||
update_hash = Column(String(128))
|
||||
rental_price = Column(DECIMAL(10, 2))
|
||||
brand = Column(String(128))
|
||||
available = Column(Boolean, default=True)
|
||||
created_at = Column(TIMESTAMP, server_default=func.now())
|
||||
updated_at = Column(TIMESTAMP, server_default=func.now(), onupdate=func.now())
|
||||
|
||||
@property
|
||||
def image_url(self) -> str | None:
|
||||
"""Return local image URL if images exist, else None."""
|
||||
if self.images and len(self.images) > 0:
|
||||
return f"/api/equipment/{self.id}/image"
|
||||
return None
|
||||
|
||||
__table_args__ = (
|
||||
Index("idx_equipment_category", "category"),
|
||||
Index("idx_equipment_name", "name"),
|
||||
|
||||
Reference in New Issue
Block a user