Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Update_For_RIDDL_Udpates' into U…
Browse files Browse the repository at this point in the history
…pdate_For_RIDDL_Udpates

# Conflicts:
#	src/main/riddl/Commerce/commerce.riddl
#	src/main/riddl/Events/Reservations/reservationTypeDefinitions.riddl
#	src/main/riddl/Gateway/MemberGateway/memberGateway.riddl
#	src/main/riddl/Organization/organization.riddl
#	src/main/riddl/Store/Store.riddl
#	src/main/riddl/Tenant/tenant.riddl
#	src/main/riddl/Venues/Locations/locationMessages.riddl
#	src/main/riddl/Venues/Locations/locationTypeDefinitions.riddl
#	src/main/riddl/Venues/venueLocationsProjections.riddl
#	src/main/riddl/Venues/venueLocationsReservationsMessages.riddl
#	src/main/riddl/Venues/venueMessages.riddl
  • Loading branch information
AlexWeinstein92 committed Mar 8, 2024
2 parents c80d666 + 34d86ec commit 3b66694
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 53 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Global / onChangedBuildSource := ReloadOnSourceChanges
scalaVersion := "3.3.1"
lazy val riddl_version = "0.24.5"
lazy val riddl_version = "0.38.0"
libraryDependencies ++= Seq(
"com.reactific" %% "riddl-testkit" % riddl_version % "test",
"com.reactific" %% "riddl-hugo" % riddl_version % "test",
Expand All @@ -10,7 +10,7 @@ libraryDependencies ++= Seq(
enablePlugins(RiddlSbtPlugin)
riddlcOptions :=
Seq("--show-times", "from", "src/main/riddl/ImprovingApp.conf", "hugo")
riddlcMinVersion := "0.24.6"
riddlcMinVersion := "0.38.0"
riddlcPath := file(
// NOTE: Set this to your local path which will always have this portion
// NOTE: of the path as a constant: riddl/riddlc/target/universal/stage/bin/riddlc
Expand Down
16 changes: 8 additions & 8 deletions src/main/riddl/Commerce/commerce.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ context Commerce is {
type NullState is Nothing

entity Promotion is {
state Active of NullState is { ??? }
handler ActivePromotionHandler is { ??? }
state Expired of NullState is { ??? }
handler InactivePromotionHandler is { ??? }
state Active of Commerce.NullState is {???}
handler ActivePromotionHandler is {???}
state Expired of Commerce.NullState is {???}
handler InactivePromotionHandler is {???}
} //not part of MVP

entity PaymentProvider is {???} //TBD - after MVP
Expand All @@ -40,13 +40,13 @@ context Commerce 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: Chrono.TimeRange?,
range: ImprovingApp.TimeRange?,
title: String?,
description: String?,
forOrg: OrganizationId?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ context DemoScenarioGateway is {
productInfo: ProductContext.ProductInfo,
productMeta: ProductContext.ProductMetaInfo
}
}
}
4 changes: 2 additions & 2 deletions src/main/riddl/Gateway/MemberGateway/memberGateway.riddl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context MemberGateway is {
option gateway

type MemberType is any of {Student, FacultyStaff, Vendor, Sponsor, General, Alumni, Parent, Fan}
type MemberMap is mapping from MemberContext.MemberId to MemberInfo
type NotificationPreference is any of {email, sms}
Expand Down Expand Up @@ -44,4 +44,4 @@ context MemberGateway is {
type MemberSuspended is event {memberId: MemberContext.MemberId, memberMeta: MemberMetaInfo}
type TerminateMember is command {memberId: MemberContext.MemberId, actingMember: MemberContext.MemberId}
type MemberTerminated is event {memberId: MemberContext.MemberId, memberMeta: MemberMetaInfo}
}
}
4 changes: 1 addition & 3 deletions src/main/riddl/ImprovingApp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ common = {
verbose = false
quiet = false
dry-run = false
hide-warnings = true
hide-missing-warnings = true
hide-style-warnings = true
debug = false
show-unused-warnings = false
group-messages-by-kind = true
}

# This block provides options for the "hugo" command to translate riddl to a hugo web site.
Expand Down
2 changes: 1 addition & 1 deletion src/main/riddl/Organization/organization.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ context OrganizationContext is {
include "organizationSources"

entity Organization is {
by author Reid
option event-sourced
option available
by author Reid

handler OrganizationHandler is {
on command EstablishOrganization {
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
}
}
4 changes: 2 additions & 2 deletions src/main/riddl/Venues/Locations/locationTypeDefinitions.riddl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type Status is any of {Draft, Open, Closed} briefly "Internal status of a Location."

type Info is {
id: type Venues.LocationId,
id: Venues.LocationId,
venueId: VenueId,
name: String,
description: String,
Expand Down 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."
2 changes: 1 addition & 1 deletion src/main/riddl/Venues/venueLocationsProjections.riddl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
projector VenueLocationsReservationsView is {
record Fields {
venueId: VenueId,
locationId: Venues.LocationId
Venues.locationId: LocationId
}
handler VenueLocationsViewHandler is {
on event VenueEstablished {
Expand Down
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 @@ -25,15 +25,15 @@ result VenueAvailabilityCalendar is {
schedule: VenueAvailabilitySchedule* briefly "A list of location with time ranges indicating availability"
}

//based on LocationId
//based on Venus.LocationId
query GetNextLocationReservations is {
locationId: Venues.LocationId,
maxCount: Integer,
startDate: TimeStamp? briefly "Used as start date of query when present instead of now()"
}
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+
}
2 changes: 1 addition & 1 deletion src/main/riddl/test/TestGateway.riddl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ context TestGateway is {
by author Reid

include "messages"
include "handler"
// include "handler"

} briefly "A gateway for testing Improving.app instances" explained as {
| The messages sent to this service will create various entities. This is
Expand Down
13 changes: 0 additions & 13 deletions src/main/riddl/test/handler.riddl

This file was deleted.

0 comments on commit 3b66694

Please sign in to comment.