Changes between Version 9 and Version 10 of UseCase216049
- Timestamp:
- 12/27/23 23:21:52 (11 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UseCase216049
v9 v10 8 8 {{{#!div style="font-size: 80%" 9 9 {{{#!sql 10 insert into Lugje(l_ime, l_prezime, l_email, l_adresa, l_telefon, l_is_admin, l_lozinka)11 values ('Test', ' Test', 'test@test.com', 'test adresa 1', '070111222', false, 'tt');10 insert into Korisnik (k_ime, k_adresa, k_telefon, k_email, k_embg, k_is_admin, k_lozinka) 11 values ('Test', 'test adresa 1', '070010202', 'test@test.com', '1010002450050', false, 'tt'); 12 12 13 insert into Patnik(l_id); 14 }}} 15 }}} 16 17 {{{#!div style="font-size: 80%" 18 {{{#!sql 19 insert into Dokument(d_broj_na_dok, d_koj_go_izdal, d_datum_izd, d_datum_ist, l_id) 20 values ('A012345', 'MVR test', '2022-12-12', '2027-12-11', 5); 13 insert into Patnik(k_id); 21 14 }}} 22 15 }}} 23 16 24 17 [[Image(registracija_216049.png)]] 25 26 27 [[Image(dokumenti_216049.png)]]28 18 29 19 … … 33 23 {{{#!div style="font-size: 80%" 34 24 {{{#!sql 35 select l_id from project.Lugje where l_email = 'test@test.com' and l_lozinka = 'tt';25 select k_id from project.Korisnik where k_email = 'test@test.com' and k_lozinka = 'tt'; 36 26 }}} 37 27 }}} … … 43 33 {{{#!div style="font-size: 80%" 44 34 {{{#!sql 45 select tb_ime from KategorijaNaBilet35 select tb_ime from TipBilet 46 36 }}} 47 37 }}} … … 50 40 {{{#!div style="font-size: 80%" 51 41 {{{#!sql 52 insert into Bilet (l_id, tb_id, b_datum_kupuvanje)53 values ( 5, 1, now());42 insert into Bilet (b_datum_na_kupuvanje, b_status, patnik_k_id, tb_id) 43 values (now(), 'INACTIVE', 5, 1); 54 44 }}} 55 45 }}} … … 63 53 {{{#!div style="font-size: 80%" 64 54 {{{#!sql 55 65 56 select b_id 66 57 from project.bilet b 67 join project.kategorijanabilet kb on kb.tb_id = b.tb_id 68 where b.patnik_l_id = 1 and now() between b.b_datum_na_kupuvanje and (b.b_datum_na_kupuvanje + ((kb.tb_trajnost||' minutes')::interval)) 58 join project.tipbilet tb on tb.tb_id = b.tb_id 59 where b.patnik_k_id = 5 and b.b_status in ('ACTIVE', 'INACTIVE') 60 69 61 }}} 70 62 }}} … … 72 64 {{{#!div style="font-size: 80%" 73 65 {{{#!sql 74 insert into Vozenje(vozenje_start, patnik_l_id, kacuva_pnl_id, dr_id, b_id) 75 values (now(), 5, 2, 1, 1); 66 67 update project.vozenje 68 set vozenje_status = 'FINISHED' 69 where vozenje_id = (select vozenje_id from project.vozenje where patnik_k_id = 5 and vozenje_status = 'ACTIVE') 70 71 insert into Vozenje(vozenje_start, vozenje_end, patnik_k_id, kacuva_pnl_id, inl_id, b_id, vozenje_status) 72 values ('2023-01-01 12:00:00', null, 5, 2, 1, 6, 'ACTIVE'); 73 74 update project.bilet 75 set b_status = 'ACTIVE' 76 where b_id = 6; 76 77 77 78 }}} … … 87 88 {{{#!div style="font-size: 80%" 88 89 {{{#!sql 90 91 vozenje_id = (select vozenje_id from project.vozenje where patnik_k_id = 1 and vozenje_status = 'ACTIVE') 89 92 insert into se_simnuva_na(pnl_id, vozenje_id) 93 94 update project.vozenje 95 set vozenje_status = 'FINISHED' 96 where vozenje_id = (select vozenje_id from project.vozenje where patnik_k_id = 1 and vozenje_status = 'ACTIVE') 90 97 }}} 91 98 }}}