feat: architecture DDD hexagonale + tooling Vite/TypeScript
Migration complète du monolithe vers une architecture en couches : - Domain : entités, value objects, services purs, ports - Application : CQRS avec CommandBus/QueryBus, 15+ commandes, 9 requêtes - Tooling : Vite + TypeScript strict + Vitest + path aliases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
20
src/application/queries/GetWorkflows.ts
Normal file
20
src/application/queries/GetWorkflows.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { AppState } from '@domain/ports/StateRepository';
|
||||
|
||||
export interface GetWorkflowsQuery { type: 'get-workflows'; }
|
||||
|
||||
export interface WorkflowItem {
|
||||
id: number;
|
||||
name: string;
|
||||
target: string;
|
||||
qty: number;
|
||||
createdAt: number;
|
||||
materials: Array<{ name: string; needed: number; done: number }>;
|
||||
steps: Array<{
|
||||
gen: number;
|
||||
crossings: Array<{ race: string; needed: number; parentA: string; parentB: string; couples: number; repro: number; done: number }>;
|
||||
}>;
|
||||
}
|
||||
|
||||
export function createGetWorkflowsHandler(state: AppState) {
|
||||
return (_query: GetWorkflowsQuery): WorkflowItem[] => state.workflows as WorkflowItem[];
|
||||
}
|
||||
Reference in New Issue
Block a user