Create well-structured service layer classes that encapsulate business logic, coordinate between repositories, and provide clean interfaces for controllers and APIs.
| CRUD Service | Basic DocType operations | CustomerService | | Workflow Service | State transitions, approvals | ApprovalService | | Integration Service | External API calls | PaymentGatewayService | | Orchestration Service | Multi-DocType coordination | OrderFulfillmentService | | Batch Service | Bulk operations | BulkImportService |
┌─────────────────────┐ │ Controller/API │ └──────────┬──────────┘ │ ▼ ┌─────────────────────┐ │ │ ← Business Logic │ Service │ └──────────┬──────────┘ │ ▼ ┌─────────────────────┐ │ │ ← Data Access │ Repository │ └──────────┬──────────┘ │ ▼ ┌─────────────────────┐ │ Database │ └─────────────────────┘
Entwerfen und implementieren Sie Service-Layer-Klassen für Frappe Framework v15 mit ordnungsgemäßer Trennung der Geschäftslogik. Auslöser: „Dienst erstellen“, „Dienstschicht hinzufügen“, „Frappe-Dienst“, „Geschäftslogik“, „/frappe-Dienst“. Erzeugt Serviceklassen mit Validierungs-, Orchestrierungs- und Integrationsmustern. Quelle: sergio-bershadsky/ai.