Changes between Initial Version and Version 1 of ProductChange


Ignore:
Timestamp:
12/30/25 15:42:54 (15 hours ago)
Author:
235018
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProductChange

    v1 v1  
     1== Product Update
     2
     3=== Actors: **Registered Employee/Boss**
     4
     5**1.** A member of the personal opens a product from their store.
     6
     7**2.** The system checks if the member has permission to change products.
     8
     9**3.** After permission is confiremed, the registered user clicks "Edit product".
     10
     11**4.** The employee/boss makes changes.
     12
     13**5.** Application updates the data in {{{product}}}.
     14
     15{{{#!sql
     16UPDATE product
     17SET price = 44.99,
     18availability = 15,
     19description = 'Updated handmade wooden box'
     20WHERE code = '00100001';
     21
     22}}}
     23
     24**6.** If new pictures of the product, the data in {{{image}}} is updated accordingly.
     25
     26{{{#!sql
     27INSERT INTO image(product_code, image) VALUES
     28('00100001', 'black-box-open.png');
     29
     30}}}
     31
     32
     33{{{#!sql
     34DELETE FROM image
     35WHERE product_code='00100001' AND image='black-box-side.png';
     36
     37}}}
     38
     39**7.** If the colors in which the product is available changes, {{{color}}} is updated accordingly.
     40
     41{{{#!sql
     42INSERT INTO color(product_code, color) VALUES
     43('00100001','Blue and White');
     44
     45}}}
     46
     47{{{#!sql
     48DELETE FROM color
     49WHERE product_code='00100001' AND color='Black';
     50
     51}}}
     52
     53**8.** The change is logged in {{{change}}}.
     54
     55{{{#!sql
     56INSERT INTO change(date_and_time, product_code, changes) VALUES
     57('2025-12-30 15:40:35', '00100001', 'Changed color "Black" to "Blue and White"');
     58
     59}}}
     60
     61**9.** The employee who made the change is logged in {{{makes_change}}}.
     62
     63{{{#!sql
     64INSER INTO makes_change(personal_ID, change_date_time, product_code) VALUES
     65('0010002', '2025-12-30 15:40:35', '00100001');
     66
     67}}}
     68