Skip to content

Commit

Permalink
Fix remaining parsing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
reid-spencer committed Mar 7, 2024
1 parent f24280a commit 34d86ec
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 42 deletions.
14 changes: 7 additions & 7 deletions src/main/riddl/Commerce/commerce.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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,
forOrg: OrganizationId
}

type UpdateInfo is {
range: TimeRange?,
range: ImprovingApp.TimeRange?,
title: String?,
description: String?,
forOrg: OrganizationId?
Expand Down
2 changes: 1 addition & 1 deletion src/main/riddl/Product/product.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 15 additions & 15 deletions src/main/riddl/Store/Store.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/main/riddl/Venues/Locations/location.riddl
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
20 changes: 10 additions & 10 deletions src/main/riddl/Venues/Locations/locationMessages.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -56,7 +56,7 @@ query GetNextLocationReservations is {
}
query GetLocationReservations is {
venueId: Venues.LocationId,
ranges: TimeRange+
ranges: ImprovingApp.TimeRange+
}
result LocationReservations is {
venueId: Venues.LocationId,
Expand All @@ -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}
Expand All @@ -84,4 +84,4 @@ query GetLocationVenue is {
result LocationVenue is {
locationId: Venues.LocationId,
venueId: VenueId
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ query GetNextVenueReservations is {
}
query GetVenueReservationsInRange is {
venueId: VenueId,
range: TimeRange+
range: ImprovingApp.TimeRange+
}
result VenueReservations is {
venueId: VenueId,
Expand All @@ -33,7 +33,7 @@ query GetNextLocationReservations is {
}
query GetLocationReservations is {
venueId: Venues.LocationId,
ranges: TimeRange+
ranges: ImprovingApp.TimeRange+
}
result LocationReservations is {
venueId: Venues.LocationId,
Expand All @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions src/main/riddl/Venues/venueMessages.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ query GetNextVenueReservations is {
}
query GetVenueReservations is {
venueId: VenueId,
range: TimeRange+
range: ImprovingApp.TimeRange+
}
result VenueReservations is {
venueId: VenueId,
Expand Down Expand Up @@ -98,5 +98,5 @@ type VenueReservationsSchedule is {
}
type VenueAvailabilitySchedule is {
locationId: Venues.LocationId,
schedule: TimeRange+
schedule: ImprovingApp.TimeRange+
}

0 comments on commit 34d86ec

Please sign in to comment.