| | 1 | == Employee Registration |
| | 2 | |
| | 3 | ==== Actors: **Registered Boss** |
| | 4 | |
| | 5 | **1.** The boss selects “Add Employee”. |
| | 6 | |
| | 7 | **2.** System opens form for entering employee's personal data. |
| | 8 | |
| | 9 | **3.** Employee personal data is entered. |
| | 10 | |
| | 11 | **4.** The application inserts the data into {{{personal}}}. |
| | 12 | |
| | 13 | {{{#!sql |
| | 14 | INSERT INTO personal (id, first_name, last_name, ssn, email, password) |
| | 15 | VALUES ('0010002', 'Marko', 'Petrov', '9876543210123', 'marko@store.com |
| | 16 | ', 'hashed_pw'); |
| | 17 | |
| | 18 | }}} |
| | 19 | |
| | 20 | **5.** The employee is registered in {{{employees}}}. |
| | 21 | |
| | 22 | {{{#!sql |
| | 23 | INSERT INTO employees (employee_ID, date_of_hire) |
| | 24 | VALUES ('0010002', CURRENT_DATE); |
| | 25 | |
| | 26 | }}} |
| | 27 | |
| | 28 | **6.** The employee is assigned to a store via {{{works_in_store}}}. |
| | 29 | |
| | 30 | {{{#!sql |
| | 31 | INSERT INTO works_in_store (personal_ID, store_ID) |
| | 32 | VALUES ('0010002', '001'); |
| | 33 | |
| | 34 | }}} |