- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
20 lines
990 B
Python
20 lines
990 B
Python
"""
|
|
@model SettingModel (Backend/app/models/SettingModel.py)
|
|
@purpose Robust key-value setting model for system configuration across Core, Storefront, Shipping, and Repair domains.
|
|
"""
|
|
from sqlalchemy import Column, String, Boolean, JSON
|
|
from app.core.database.db_session import Base
|
|
from app.models.audit_base import AuditBaseMixin
|
|
|
|
class Setting(Base, AuditBaseMixin):
|
|
__tablename__ = "settings"
|
|
|
|
setting_id = Column(String(36), primary_key=True, index=True)
|
|
setting_key = Column(String(128), unique=True, index=True, nullable=False)
|
|
group = Column(String(64), nullable=False, default="storefront", index=True)
|
|
type = Column(String(32), nullable=False, default="string")
|
|
setting_value = Column(JSON, nullable=False)
|
|
description = Column(String(500), nullable=True)
|
|
is_public = Column(Boolean, default=True, nullable=False, index=True)
|
|
is_editable = Column(Boolean, default=True, nullable=False)
|
|
validation_rule = Column(String(255), nullable=True)
|