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:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user