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 │ └─────────────────────┘
Diseñe e implemente clases de capa de servicio para Frappe Framework v15 con una separación adecuada de la lógica empresarial. Activadores: "crear servicio", "agregar capa de servicio", "servicio frappe", "lógica empresarial", "/servicio-frappe". Genera clases de servicio con patrones de validación, orquestación e integración. Fuente: sergio-bershadsky/ai.