User Story #872
Updated by Islam Mansoori about 1 month ago
## Backend User Story – Itinerary Service **User Story** **As a Backend Developer, I want to build an Itinerary Service that manages package itineraries so that itinerary data is stored, validated, versioned, and served consistently to all consuming applications.** ### Scope - Develop REST APIs to create, retrieve, update, and delete itinerary records. - Implement itinerary versioning with support for draft and published states. Responsibilities - Validate mandatory fields before saving. Store - Enforce unique day numbers within a package. Retrieve - Ensure itinerary day sequence starts from Day 1 and contains no gaps. Update - Return Version itinerary data ordered by day sequence. - Maintain audit fields (Created By, Updated By, Created Date, Updated Date). - Support retrieval of the latest published itinerary by Package ID. ### Business Rules - Every itinerary must be associated with a valid Package. - Day sequence is mandatory and must be continuous. mandatory. - Duplicate day numbers within the same package are not allowed. - Only one published version of an itinerary can exist at a time. - Changes to published itineraries shall create a new version while preserving historical versions. ### Acceptance Criteria - APIs successfully perform CRUD operations on itinerary data. - Validation prevents duplicate or missing day numbers. - Itinerary is always returned in ascending day order. - Version history is maintained for all published changes. - Only the latest published itinerary is exposed to frontend consumers.