Kodall
Exercises

Exercise 17: Fashion Design Studio

Rendering diagram...

Description

  • The property “name” in the table “collection_state” can have the values: "Planned", "Released", "Discontinued".
  • This app manages fashion collections, garments, and designers. It tracks collections with details like title, season, release date, and total price, and associates them with a designer and collection state. Garments are linked to a collection, garment type, and designer. Designers are responsible for creating both collections and garments. The app organizes and connects designers, collections, and garments for efficient management of fashion lines.
  • The property “name” in the table “garment_type” can have the values: "Head", "Body", "Leggings", "Shoes".
  • In entities “garment_type” and “collection_state”, name represents the state that will be displayed on the screen, label represents the value that programmer will use to filter the states, and the uuid represents a value to distinguish the states.
  • Note: The value of the field "uuid" is generated automatically.

Tasks

  • designer/collection/garment/garment_type/collection_state: Add, Edit, Delete.
    • When the collection is created, it will automatically become "Planned".
    • The field "Collection state" from entity "collection" will be read-only in edit view.
  • Create catalogs for all entities.
  • Create event listeners for tables that needs validations (e.g., adding a designer without a name, a garment without a type, etc., should not be allowed).
  • Add a new entity action at the collection level “Discontinue collection”:
    • It will change the collection status from "Released" to "Discontinued";
    • A collection cannot be discontinued if it is in the "Planned" state → validation message.
    • A collection cannot be discontinued if it is already in the "Discontinued" state → validation message.
  • Add a new entity action at the collection level "Release collection":
    • It can select a designer;
    • After the release, the state will change from "Planned" → "Released";
    • A collection cannot be released if it is already in the "Released" state;
    • If the collection doesn't have all types of garments (Head, Body, Leggings, Shoes), it cannot be released and it will display an error through a validation;
    • If the garments have different designers than the one selected, it will display an error through a validation;
    • In collection, calculate the total price of garments and will update the property "total_price".
  • Designer report: collection situation at designer level (total number of collections, total price).