From 34d86ece79083899b5b3f9ea029464ac9963b834 Mon Sep 17 00:00:00 2001 From: reidspencer Date: Thu, 7 Mar 2024 14:20:57 -0500 Subject: [PATCH] Fix remaining parsing errors --- src/main/riddl/Commerce/commerce.riddl | 14 ++++----- .../reservationTypeDefinitions.riddl | 4 +-- src/main/riddl/Product/product.riddl | 2 +- src/main/riddl/Store/Store.riddl | 30 +++++++++---------- .../riddl/Venues/Locations/location.riddl | 2 +- .../Venues/Locations/locationMessages.riddl | 20 ++++++------- .../Locations/locationTypeDefinitions.riddl | 2 +- .../venueLocationsReservationsMessages.riddl | 6 ++-- src/main/riddl/Venues/venueMessages.riddl | 4 +-- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/main/riddl/Commerce/commerce.riddl b/src/main/riddl/Commerce/commerce.riddl index 92d3a642..6bbbac50 100644 --- a/src/main/riddl/Commerce/commerce.riddl +++ b/src/main/riddl/Commerce/commerce.riddl @@ -18,9 +18,9 @@ context Commerce is { type NullState is Nothing entity Promotion is { - state Active of ^^NullState is {???} + state Active of Commerce.NullState is {???} handler ActivePromotionHandler is {???} - state Expired of ^^NullState is {???} + state Expired of Commerce.NullState is {???} handler InactivePromotionHandler is {???} } //not part of MVP @@ -33,20 +33,20 @@ context Commerce is { amount: Number, dateProcessed: DateTime } - state Payment of ^PaymentState is { + state Payment of PaymentState is { handler PaymentHandler is {???} } } entity Cart is {???} //develop as a future feature - Persistant Cart - Training exercise entity Delivery is { - state Pending of ^^NullState is {???} + state Pending of Commerce.NullState is {???} handler PendingDeliveryHandler is {???} - state Ready of ^^NullState is {???} + state Ready of Commerce.NullState is {???} handler ReadyDeliveryHandler is {???} - state EnRoute of ^^NullState is {???} + state EnRoute of Commerce.NullState is {???} handler EnRoutDeliveryHandler is {???} - state Delivered of ^^NullState is {???} + state Delivered of Commerce.NullState is {???} handler DeliveredDeliveryHandler is {???} } //not part of MVP } diff --git a/src/main/riddl/Events/Reservations/reservationTypeDefinitions.riddl b/src/main/riddl/Events/Reservations/reservationTypeDefinitions.riddl index b6341ee9..9fa41fcc 100644 --- a/src/main/riddl/Events/Reservations/reservationTypeDefinitions.riddl +++ b/src/main/riddl/Events/Reservations/reservationTypeDefinitions.riddl @@ -1,7 +1,7 @@ type Status is any of {Draft, OnHold, Reserved, Past, Cancelled} briefly "Internal status of a Reservation." type Info is { - range: Chrono.TimeRange, + range: ImprovingApp.TimeRange, title: String, description: String, location: Venues.LocationId, @@ -9,7 +9,7 @@ type Info is { } type UpdateInfo is { - range: TimeRange?, + range: ImprovingApp.TimeRange?, title: String?, description: String?, forOrg: OrganizationId? diff --git a/src/main/riddl/Product/product.riddl b/src/main/riddl/Product/product.riddl index da681b19..b99ad502 100644 --- a/src/main/riddl/Product/product.riddl +++ b/src/main/riddl/Product/product.riddl @@ -69,7 +69,7 @@ context ProductContext is { result TicketsForEvent is {event: EventId, tickets: SKU*} entity Product is { - options event-sourced + option event-sourced handler ProductHandler is { on command CreateProduct { morph entity Product to state DraftProductState with record DraftProduct diff --git a/src/main/riddl/Store/Store.riddl b/src/main/riddl/Store/Store.riddl index 22a4298f..7a7b31f8 100644 --- a/src/main/riddl/Store/Store.riddl +++ b/src/main/riddl/Store/Store.riddl @@ -193,13 +193,13 @@ context StoreContext is { // lastUpdatedBy = @OpenStore.openingMember, // currentState = @StoreStates.Open // ) - send event StoreOpened -// ( -// storeId = @CreatedStoreState.id, -// info = @CreatedStoreState.info, -// meta = @CreatedStoreState.meta -// ) - to outlet StoreEvents.Events + send event StoreOpened to outlet StoreEvents.Events + // ( + // storeId = @CreatedStoreState.id, + // info = @CreatedStoreState.info, + // meta = @CreatedStoreState.meta + // ) + become entity Store to handler OpenStoreHandler } on command CloseStore { @@ -212,13 +212,13 @@ context StoreContext is { // lastUpdatedBy = @CloseStore.closingMember, // currentState = @StoreStates.Closed // ) - send event StoreClosed + send event StoreClosed to outlet StoreEvents.Events // ( // storeId = @CreatedStoreState.id, // info = @CreatedStoreState.info, // meta = @CreatedStoreState.meta // ) - to outlet StoreEvents.Events + become entity Store to handler ClosedStoreHandler } on command AddProductsToStore { @@ -275,13 +275,13 @@ context StoreContext is { // lastUpdatedBy = @CloseStore.closingMember, // currentState = @StoreStates.Closed // ) - send event StoreClosed + send event StoreClosed to outlet StoreEvents.Events // ( // storeId = @CreatedStoreState.id, // info = @CreatedStoreState.info, // meta = @CreatedStoreState.meta // ) - to outlet StoreEvents.Events + become entity Store to handler ClosedStoreHandler } on command AddProductsToStore { @@ -331,13 +331,13 @@ context StoreContext is { // lastUpdatedBy = @DeleteStore.deletingMember, // currentState = @StoreStates.Deleted // ) - send event StoreDeleted + send event StoreDeleted to outlet StoreEvents.Events // ( // storeId = @CreatedStoreState.id, // info = @CreatedStoreState.info, // meta = @CreatedStoreState.meta // ) - to outlet StoreEvents.Events + morph entity Store to state DeletedStore with record DeletedStoreState // ( // storeName = @CreatedStoreState.info.storeName, @@ -357,13 +357,13 @@ context StoreContext is { // lastUpdatedBy = @OpenStore.openingMember, // currentState = @StoreStates.Open // ) - send event StoreOpened + send event StoreOpened to outlet StoreEvents.Events // ( // storeId = @CreatedStoreState.id, // info = @CreatedStoreState.info, // meta = @CreatedStoreState.meta // ) - to outlet StoreEvents.Events + become entity Store to handler OpenStoreHandler } on command CloseStore { diff --git a/src/main/riddl/Venues/Locations/location.riddl b/src/main/riddl/Venues/Locations/location.riddl index d1d06529..c2dbd6b7 100644 --- a/src/main/riddl/Venues/Locations/location.riddl +++ b/src/main/riddl/Venues/Locations/location.riddl @@ -1,4 +1,4 @@ -type LocationId is Id (ImprovingApp.Venues.LocationContext.Location) +type LocationId is Id (Venues.LocationContext.Location) briefly "Unique identifier for Location Entity" context LocationContext is { diff --git a/src/main/riddl/Venues/Locations/locationMessages.riddl b/src/main/riddl/Venues/Locations/locationMessages.riddl index 2d60283e..64b16ac5 100644 --- a/src/main/riddl/Venues/Locations/locationMessages.riddl +++ b/src/main/riddl/Venues/Locations/locationMessages.riddl @@ -14,9 +14,9 @@ command EstablishLocation is { event LocationEstablished is { locationId: Venues.LocationId, - locationInfo: LocationContext.Info, + locationInfo: Venues.LocationContext.Info, reservations: ReservationId*, - meta: LocationContext.MetaInfo + meta: Venues.LocationContext.MetaInfo } command AddLocationReservations is { @@ -30,23 +30,23 @@ event LocationReservationsAdded is { command UpdateLocationStatus is { locationId: Venues.LocationId, - status: LocationContext.Status, + status: Venues.LocationContext.Status, updatingMember: MemberId } event LocationStatusUpdated is { locationId: Venues.LocationId, - newStatus: LocationContext.Status + newStatus: Venues.LocationContext.Status } command EditLocationInfo is { locationId: Venues.LocationId briefly "The unique Id of the location to create", - newInfo: LocationContext.UpdateInfo briefly "The information about the location", + newInfo: Venues.LocationContext.UpdateInfo briefly "The information about the location", editingMember: MemberId briefly "Id of the member who is creating the location" } briefly "A command to edit the values of an Reservation's Info " event LocationInfoUpdated is { locationId: Venues.LocationId, - info: LocationContext.Info, - meta: LocationContext.MetaInfo + info: Venues.LocationContext.Info, + meta: Venues.LocationContext.MetaInfo } query GetNextLocationReservations is { @@ -56,7 +56,7 @@ query GetNextLocationReservations is { } query GetLocationReservations is { venueId: Venues.LocationId, - ranges: TimeRange+ + ranges: ImprovingApp.TimeRange+ } result LocationReservations is { venueId: Venues.LocationId, @@ -72,7 +72,7 @@ query GetNextLocationAvailability is { } result LocationAvailabilityCalendar is { locationId: Venues.LocationId, - schedule: TimeRange* briefly "A list of time ranges indicating availability" + schedule: ImprovingApp.TimeRange* briefly "A list of time ranges indicating availability" } query FindAvailableLocationsInRange is {locationId: Venues.LocationId, start: Date, end: Date} @@ -84,4 +84,4 @@ query GetLocationVenue is { result LocationVenue is { locationId: Venues.LocationId, venueId: VenueId -} \ No newline at end of file +} diff --git a/src/main/riddl/Venues/Locations/locationTypeDefinitions.riddl b/src/main/riddl/Venues/Locations/locationTypeDefinitions.riddl index cd0955c6..c5e4e91b 100644 --- a/src/main/riddl/Venues/Locations/locationTypeDefinitions.riddl +++ b/src/main/riddl/Venues/Locations/locationTypeDefinitions.riddl @@ -34,6 +34,6 @@ type MetaInfo is { createdBy: MemberId briefly "The member who created this venue", lastUpdated: TimeStamp briefly "The Date/Time this venue was last modified.", lastUpdatedBy: MemberId briefly "The member who last modified this venue. This may also be a system user. i.e. they are two months late on payment so the system determines to suspend the venue.", - currentStatus: LocationContext.Status briefly "The current state of this venue. Valid states include Draft, Active, Suspended, and Terminated", + currentStatus: Venues.LocationContext.Status briefly "The current state of this venue. Valid states include Draft, Active, Suspended, and Terminated", currentOwner: MemberId } briefly "Meta data kept about a location that the user does not directly modify. Instead the system updates this info as a Member Owner updates details in the Info type." diff --git a/src/main/riddl/Venues/venueLocationsReservationsMessages.riddl b/src/main/riddl/Venues/venueLocationsReservationsMessages.riddl index b4630802..85e16ee2 100644 --- a/src/main/riddl/Venues/venueLocationsReservationsMessages.riddl +++ b/src/main/riddl/Venues/venueLocationsReservationsMessages.riddl @@ -6,7 +6,7 @@ query GetNextVenueReservations is { } query GetVenueReservationsInRange is { venueId: VenueId, - range: TimeRange+ + range: ImprovingApp.TimeRange+ } result VenueReservations is { venueId: VenueId, @@ -33,7 +33,7 @@ query GetNextLocationReservations is { } query GetLocationReservations is { venueId: Venues.LocationId, - ranges: TimeRange+ + ranges: ImprovingApp.TimeRange+ } result LocationReservations is { venueId: Venues.LocationId, @@ -49,7 +49,7 @@ query GetNextLocationAvailability is { } result LocationAvailabilityCalendar is { locationId: Venues.LocationId, - schedule: TimeRange* briefly "A list of time ranges indicating availability" + schedule: ImprovingApp.TimeRange* briefly "A list of time ranges indicating availability" } query FindAvailableLocationsInDateRange is {locationId: Venues.LocationId, start: Date, end: Date} diff --git a/src/main/riddl/Venues/venueMessages.riddl b/src/main/riddl/Venues/venueMessages.riddl index 348128f1..04a733ad 100644 --- a/src/main/riddl/Venues/venueMessages.riddl +++ b/src/main/riddl/Venues/venueMessages.riddl @@ -49,7 +49,7 @@ query GetNextVenueReservations is { } query GetVenueReservations is { venueId: VenueId, - range: TimeRange+ + range: ImprovingApp.TimeRange+ } result VenueReservations is { venueId: VenueId, @@ -98,5 +98,5 @@ type VenueReservationsSchedule is { } type VenueAvailabilitySchedule is { locationId: Venues.LocationId, - schedule: TimeRange+ + schedule: ImprovingApp.TimeRange+ }