Refactor domain structure to business layer

- Renamed `domain/` to `business/` to better reflect the organization of code by business logic.
- Updated all relevant file paths and references throughout the project to align with the new structure.
- Ensured that all models and services are now located under the `business/` directory, maintaining existing functionality while improving clarity.
This commit is contained in:
IGNY8 VPS (Salman)
2025-11-16 21:47:51 +00:00
parent cb0e42bb8d
commit 455358ecfc
11 changed files with 281 additions and 281 deletions

View File

@@ -49,11 +49,11 @@
| Task | File | Dependencies | Implementation |
|------|------|--------------|----------------|
| **SiteIntegration Model** | `domain/integration/models.py` | Phase 1 | Store integration configs |
| **SiteIntegration Model** | `business/integration/models.py` | Phase 1 | Store integration configs |
**SiteIntegration Model**:
```python
# domain/integration/models.py
# business/integration/models.py
class SiteIntegration(SiteSectorBaseModel):
site = models.ForeignKey(Site, on_delete=models.CASCADE)
platform = models.CharField(max_length=50) # 'wordpress', 'shopify', 'custom'
@@ -74,8 +74,8 @@ class SiteIntegration(SiteSectorBaseModel):
| Task | File | Dependencies | Implementation |
|------|------|--------------|----------------|
| **IntegrationService** | `domain/integration/services/integration_service.py` | Phase 1 | Manage integrations |
| **SyncService** | `domain/integration/services/sync_service.py` | Phase 1 | Handle two-way sync |
| **IntegrationService** | `business/integration/services/integration_service.py` | Phase 1 | Manage integrations |
| **SyncService** | `business/integration/services/sync_service.py` | Phase 1 | Handle two-way sync |
---
@@ -85,10 +85,10 @@ class SiteIntegration(SiteSectorBaseModel):
| Task | File | Dependencies | Implementation |
|------|------|--------------|----------------|
| **BaseAdapter** | `domain/publishing/services/adapters/base_adapter.py` | Phase 5 | Base adapter interface |
| **WordPressAdapter** | `domain/publishing/services/adapters/wordpress_adapter.py` | EXISTING (refactor) | WordPress publishing |
| **SitesRendererAdapter** | `domain/publishing/services/adapters/sites_renderer_adapter.py` | Phase 5 | IGNY8 Sites deployment |
| **ShopifyAdapter** | `domain/publishing/services/adapters/shopify_adapter.py` | Phase 5 (future) | Shopify publishing |
| **BaseAdapter** | `business/publishing/services/adapters/base_adapter.py` | Phase 5 | Base adapter interface |
| **WordPressAdapter** | `business/publishing/services/adapters/wordpress_adapter.py` | EXISTING (refactor) | WordPress publishing |
| **SitesRendererAdapter** | `business/publishing/services/adapters/sites_renderer_adapter.py` | Phase 5 | IGNY8 Sites deployment |
| **ShopifyAdapter** | `business/publishing/services/adapters/shopify_adapter.py` | Phase 5 (future) | Shopify publishing |
---
@@ -98,12 +98,12 @@ class SiteIntegration(SiteSectorBaseModel):
| Task | File | Dependencies | Implementation |
|------|------|--------------|----------------|
| **Extend PublisherService** | `domain/publishing/services/publisher_service.py` | Phase 5 | Support multiple destinations |
| **Update PublishingRecord** | `domain/publishing/models.py` | Phase 5 | Track multiple destinations |
| **Extend PublisherService** | `business/publishing/services/publisher_service.py` | Phase 5 | Support multiple destinations |
| **Update PublishingRecord** | `business/publishing/models.py` | Phase 5 | Track multiple destinations |
**Multi-Destination Publishing**:
```python
# domain/publishing/services/publisher_service.py
# business/publishing/services/publisher_service.py
class PublisherService:
def publish(self, content, destinations):
"""Publish content to multiple destinations"""