wiki:ImportatntUseCase001

Employee clocks in

Actors

  • Employee

Steps in the Scenario

1. Employee logs in.

SELECT u.email, u.password FROM users u WHERE u.email = ?; -- and password application check

2. Employee views his shift.

SELECT a.id, a.shift_id, a.manager_id, s.start_time, s.end_time FROM assignments a
LEFT JOIN public.shifts s on s.id = a.shift_id
LEFT JOIN public.managers m on a.manager_id = m.employee_id
WHERE s.date = current_date AND a.employee_id = 1;

3. Employee clocks in work.

UPDATE assignments SET clock_in_time = current_time WHERE assignments.employee_id = 1 AND assignments.shift_id = ?;
Last modified 12 days ago Last modified on 02/10/25 11:52:12
Note: See TracWiki for help on using the wiki.