TWPRO-6918 - Packages
Models
Package
Represents a package of treatments. The Package has the following attributes:
name: Name of the package (eg. "special summer haircut")description: Description of the packagevenue_id: Venue id for performance reasonsposition: Position of the package in the list of packages for a venuedeleted_at: Soft delete field
A Package can have many PackageOptions.
PackageOptions
Represents all the treatment options included in a package.
For example, for the "special summer haircut" package, we might have "option 1 - short hair" that includes "shampoo - short hair", "haircut - short hair", and "blow dry - short hair", as well as "option 2 - long hair" that includes "shampoo - long hair", "haircut - long hair", and "blow dry - long hair".
A PackageOption will be associated to the respective VenueTreatments through the PackageOptionResource model.
The PackageOption has the following attributes:
name: Name of the package option (eg. "option 1 - short hair")position: Position of the package option in the list of package options for a packagedeleted_at: Soft delete field
PackageOptionResource
This is a relationship model that has the reference to the PackageOption, a reference to a VenueTreatment and a position field for sorting.
The PackageOptionResource has the following attributes:
package_option_id: Reference to thePackageOptionvenue_treatment_id: Reference to theVenueTreatmentposition: Position of the package option in the list of package options for a package
Diagram
Here's a diagram in mermaid format that visualizes the relationships between these models: