bcgov / reserve-rec-api

For the Parks and Recreation Digital Transformation project.
Apache License 2.0
0 stars 3 forks source link

[L] PRDT: Data/Business Rules Exploration #6

Closed meyerdarcie closed 3 months ago

meyerdarcie commented 5 months ago

Description:

Before prototyping, we need to explore and understand backcountry business rules and booking data.

This ticket is to gain access to and look at backcountry business rules and data, and create a workflow of the rules.

Acceptance Criteria:

Development Checklist:

Dependencies

Relevant documentation as reference

Definition of Ready

Definition of Done

Notes

Notes from June 4 Refinement:

Image

Dianadec commented 4 months ago

Refinement notes:

Dianadec commented 4 months ago

I'll add links directly to the related mural boards to the sharepoint folder @cameronpettit

cameronpettit commented 4 months ago

Working on booking flows here if anyone wishes to take a look

cameronpettit commented 3 months ago

The more we look into this the more apparent it is that the dataset we have currently may be incomplete or inconsistent. We should strive to obtain a minimum viable dataset (MVD), but in the absence of a complete dataset, we can guess what the MVD might look like and enforce that data model moving forward.

We are going to start with gathering the data for 3 Vancouver Island parks (Cape Scott, Strathcona, and Juan de Fuca). The geospatial data for these parks seems fairly intact and trustworthy. These parks will act as data guinea pigs until our projected MVD is completely fleshed out, at which point we can start adding new parks/experiences/inventory to the database.

Building on my comment in #, I've further narrowed down the scope of data we need into 3 major categories. This is still an (opinionated) work in progress but I think it serves as a jumping off point

Places

Places are, quite simply, geospatial entities. They have a somewhat fixed, physical extension. They can be represented as a point (lat/long), a polyline, or a polygon (area). They are usually identified and specified by some given name. Some examples of places are:

Places can have at most 1 parent place and zero to many child places. For example, Bear Beach is a place (point) within Juan de Fuca Park. The Juan de Fuca Trail (polyline) is also a place within JDF Park. JDF Park is a place (polygon) within the North Island section. The North Island section is a place (polygon) within the West Coast region.

Each place must have a point representation if it is not already defined by a point. For polygons, this may be the centroid. For polylines, this may be a terminal point on the line (like a trailhead) that best represents the place.

All place data will be further handled by geospatial findings in bcgov/reserve-rec-public#4.

Permits

A permit refers to a specific ‘experience’ offered and regulated by BC Parks. They are representations of authorizations that allow users to go somewhere or do something. They may be free or cost money. Permits determine how park inventory should be allotted to potential users, enforcing policies that have to do with booking rules, party rules, changes and cancellations, and fee schedules. Every permit must belong to one or many places, therefore they also have a somewhat fixed, physical location that is defined by their parent places.

Policies

A subcategory of permits is the booking/party/change/cancellation/fee/other policies that govern the permits (see my previous comment for what these policies might entail). Many permits share the same policies, so it might makes sense to define policies as their own category such that when policy changes, it is automatically applied to all the permits that follow that policy.

Inventory

Inventory refers to a BC Parks asset provided for camper use. It is the most granular item or offering provided by BC Parks. They are typically physical resources but may also pertain to intangible items like a backcountry registration permit or ‘passport’, which only provides permission for a user to enter the backcountry but does not include any physical reservations. Inventory may be limited/finite, as is the case with tentpads, or unlimited/infinite, as is the case with some backcountry registration permits/passports. Inventory that can be reserved by users may not be held by more than one user at a time. Some inventory may also have geospatial properties. If ownership of the inventory must be tracked, such as in the case of reservations, then the inventory can belong to a permit that will govern how it is allotted to campers. Some examples of inventory are:

Places, permits and inventory are all BC Parks assets and as such can (and should) be maintained in a registry (@JLWade ), and surfaced where necessary in the reservation system. Non-asset data, like user information, transactions (which user got which permit for which inventory), and other records would likely belong to a dedicated backcountry reservations database.

@meyerdarcie @Dianadec alongside the current state of the flowcharts I've made I think this ticket has served its purpose and is more or less complete. I might spend a bit of time in the Camis field system to see if I can find out any more for https://github.com/bcgov/reserve-rec-public/issues/1 but at this point, since we are without complete data, I am more focused on https://github.com/bcgov/reserve-rec-api/issues/3 and putting together a data model.

meyerdarcie commented 3 months ago

Thank you @cameronpettit - support the approach of starting with the 3 parks, until we meet or come closer to the MVD we require to go further, as well as a final review of the field system for https://github.com/bcgov/reserve-rec-public/issues/1, and more of a focus on bcgov/reserve-rec-api#6. I will set up a ticket to be refined for MVD next steps.