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:
@@ -77,11 +77,11 @@
|
||||
|
||||
| Task | File | Dependencies | Implementation |
|
||||
|------|------|--------------|----------------|
|
||||
| **Site File Management Service** | `domain/site_building/services/file_management_service.py` | Phase 1 | File upload, delete, organize |
|
||||
| **Site File Management Service** | `business/site_building/services/file_management_service.py` | Phase 1 | File upload, delete, organize |
|
||||
|
||||
**FileManagementService**:
|
||||
```python
|
||||
# domain/site_building/services/file_management_service.py
|
||||
# business/site_building/services/file_management_service.py
|
||||
class SiteBuilderFileService:
|
||||
def get_user_accessible_sites(self, user):
|
||||
"""Get sites user can access for file management"""
|
||||
@@ -142,11 +142,11 @@ class SiteBuilderFileService:
|
||||
|
||||
| Task | File | Dependencies | Implementation |
|
||||
|------|------|--------------|----------------|
|
||||
| **SiteBlueprint Model** | `domain/site_building/models.py` | Phase 1 | Store site structure |
|
||||
| **SiteBlueprint Model** | `business/site_building/models.py` | Phase 1 | Store site structure |
|
||||
|
||||
**SiteBlueprint Model**:
|
||||
```python
|
||||
# domain/site_building/models.py
|
||||
# business/site_building/models.py
|
||||
class SiteBlueprint(SiteSectorBaseModel):
|
||||
name = models.CharField(max_length=255)
|
||||
description = models.TextField(blank=True)
|
||||
@@ -195,11 +195,11 @@ class SiteBlueprint(SiteSectorBaseModel):
|
||||
|
||||
| Task | File | Dependencies | Implementation |
|
||||
|------|------|--------------|----------------|
|
||||
| **PageBlueprint Model** | `domain/site_building/models.py` | Phase 1 | Store page definitions |
|
||||
| **PageBlueprint Model** | `business/site_building/models.py` | Phase 1 | Store page definitions |
|
||||
|
||||
**PageBlueprint Model**:
|
||||
```python
|
||||
# domain/site_building/models.py
|
||||
# business/site_building/models.py
|
||||
class PageBlueprint(SiteSectorBaseModel):
|
||||
site_blueprint = models.ForeignKey(SiteBlueprint, on_delete=models.CASCADE, related_name='pages')
|
||||
slug = models.SlugField(max_length=255)
|
||||
@@ -246,7 +246,7 @@ class PageBlueprint(SiteSectorBaseModel):
|
||||
|
||||
| Task | File | Dependencies | Implementation |
|
||||
|------|------|--------------|----------------|
|
||||
| **Site Builder Migrations** | `domain/site_building/migrations/` | Phase 1 | Create initial migrations |
|
||||
| **Site Builder Migrations** | `business/site_building/migrations/` | Phase 1 | Create initial migrations |
|
||||
|
||||
---
|
||||
|
||||
@@ -294,11 +294,11 @@ class GenerateSiteStructureFunction(BaseAIFunction):
|
||||
|
||||
| Task | File | Dependencies | Implementation |
|
||||
|------|------|--------------|----------------|
|
||||
| **Structure Generation Service** | `domain/site_building/services/structure_generation_service.py` | Phase 1, AI framework | Service to generate site structure |
|
||||
| **Structure Generation Service** | `business/site_building/services/structure_generation_service.py` | Phase 1, AI framework | Service to generate site structure |
|
||||
|
||||
**StructureGenerationService**:
|
||||
```python
|
||||
# domain/site_building/services/structure_generation_service.py
|
||||
# business/site_building/services/structure_generation_service.py
|
||||
class StructureGenerationService:
|
||||
def __init__(self):
|
||||
self.ai_function = GenerateSiteStructureFunction()
|
||||
@@ -531,13 +531,13 @@ frontend/src/components/shared/
|
||||
|
||||
| Task | File | Dependencies | Implementation |
|
||||
|------|------|--------------|----------------|
|
||||
| **Extend ContentService** | `domain/content/services/content_generation_service.py` | Phase 1 | Add site page generation method |
|
||||
| **Extend ContentService** | `business/content/services/content_generation_service.py` | Phase 1 | Add site page generation method |
|
||||
|
||||
#### Add Site Page Type
|
||||
|
||||
| Task | File | Dependencies | Implementation |
|
||||
|------|------|--------------|----------------|
|
||||
| **Add Site Page Type** | `domain/content/models.py` | Phase 1 | Add site page content type |
|
||||
| **Add Site Page Type** | `business/content/models.py` | Phase 1 | Add site page content type |
|
||||
|
||||
#### Page Generation Prompts
|
||||
|
||||
@@ -575,12 +575,12 @@ frontend/src/components/shared/
|
||||
|
||||
### Backend Tasks
|
||||
|
||||
- [ ] Create `domain/site_building/models.py`
|
||||
- [ ] Create `business/site_building/models.py`
|
||||
- [ ] Create SiteBlueprint model
|
||||
- [ ] Create PageBlueprint model
|
||||
- [ ] Create site builder migrations
|
||||
- [ ] Create `domain/site_building/services/file_management_service.py`
|
||||
- [ ] Create `domain/site_building/services/structure_generation_service.py`
|
||||
- [ ] Create `business/site_building/services/file_management_service.py`
|
||||
- [ ] Create `business/site_building/services/structure_generation_service.py`
|
||||
- [ ] Create `infrastructure/ai/functions/generate_site_structure.py`
|
||||
- [ ] Add site structure prompts
|
||||
- [ ] Create `modules/site_builder/views.py`
|
||||
|
||||
Reference in New Issue
Block a user