# Data Model: Result Preparation Refactoring **Date**: 2025-10-11 **Feature**: Result Preparation Refactoring This document defines the data structures used in the feature. ## Entities ### DesireSet Represents a single user's submission. | Field | Type | Description | |---|---|---| | participantId | string | The unique identifier for the participant. | | wants | string[] | A list of things the participant wants. | | accepts | string[] | A list of things the participant is willing to accept. | | noGoes | string[] | A list of things the participant does not want. | ### Session Represents a single session where users submit their desires. | Field | Type | Description | |---|---|---| | sessionId | string | The unique identifier for the session. | | state | SessionState | The current state of the session (`SETUP`, `GATHERING`, `HARMONIZING`, `FINAL`, `ERROR`). | | expectedResponses | number | The number of participants expected to submit their desires. | | submittedCount | number | The number of participants who have submitted their desires. | | responses | Map | A map of participant IDs to their submitted `DesireSet`. | | clients | Map | A map of client IDs to their WebSocket connections. | | finalResult | Decision \| null | The final categorized result of the session. | | topic | string \| null | The topic of the session. | ### Decision Represents the final categorized result of the analysis. | Field | Type | Description | |---|---|---| | goTos | string[] | A list of items that all participants want. | | alsoGoods | string[] | A list of items that some participants want and others accept. | | considerables | string[] | A list of items that are wanted or accepted by some participants. | | noGoes | string[] | A list of items that at least one participant does not want. | | needsDiscussion | string[] | A list of items with conflicting desires. |