Changes between Version 9 and Version 10 of UseCase216049


Ignore:
Timestamp:
12/27/23 23:21:52 (11 months ago)
Author:
216049
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase216049

    v9 v10  
    88{{{#!div style="font-size: 80%"
    99  {{{#!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');
     10insert into Korisnik (k_ime, k_adresa, k_telefon, k_email, k_embg, k_is_admin, k_lozinka)
     11values ('Test', 'test adresa 1', '070010202', 'test@test.com', '1010002450050', false, 'tt');
    1212
    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);
     13insert into Patnik(k_id);
    2114  }}}
    2215}}}
    2316
    2417[[Image(registracija_216049.png)]]
    25 
    26 
    27 [[Image(dokumenti_216049.png)]]
    2818
    2919
     
    3323{{{#!div style="font-size: 80%"
    3424  {{{#!sql
    35 select l_id from project.Lugje where l_email = 'test@test.com' and l_lozinka = 'tt';
     25select k_id from project.Korisnik where k_email = 'test@test.com' and k_lozinka = 'tt';
    3626  }}}
    3727}}}
     
    4333{{{#!div style="font-size: 80%"
    4434  {{{#!sql
    45 select tb_ime from KategorijaNaBilet
     35select tb_ime from TipBilet
    4636  }}}
    4737}}}
     
    5040{{{#!div style="font-size: 80%"
    5141  {{{#!sql
    52 insert into Bilet(l_id, tb_id, b_datum_kupuvanje)
    53 values (5, 1, now());
     42insert into Bilet (b_datum_na_kupuvanje, b_status, patnik_k_id, tb_id)
     43values (now(), 'INACTIVE', 5, 1);
    5444  }}}
    5545}}}
     
    6353{{{#!div style="font-size: 80%"
    6454  {{{#!sql
     55
    6556select b_id
    6657from 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))
     58join project.tipbilet tb on tb.tb_id = b.tb_id
     59where b.patnik_k_id  = 5 and b.b_status in ('ACTIVE', 'INACTIVE')
     60
    6961  }}}
    7062}}}
     
    7264{{{#!div style="font-size: 80%"
    7365  {{{#!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
     67update project.vozenje
     68set vozenje_status = 'FINISHED'
     69where vozenje_id = (select vozenje_id from project.vozenje where patnik_k_id = 5 and vozenje_status = 'ACTIVE')
     70
     71insert into Vozenje(vozenje_start, vozenje_end, patnik_k_id, kacuva_pnl_id, inl_id, b_id, vozenje_status)
     72values ('2023-01-01 12:00:00', null, 5, 2, 1, 6, 'ACTIVE');
     73
     74update project.bilet
     75set b_status = 'ACTIVE'
     76where b_id = 6;
    7677
    7778  }}}
     
    8788{{{#!div style="font-size: 80%"
    8889  {{{#!sql
     90
     91vozenje_id = (select vozenje_id from project.vozenje where patnik_k_id = 1 and vozenje_status = 'ACTIVE')
    8992insert into se_simnuva_na(pnl_id, vozenje_id)
     93
     94update project.vozenje
     95set vozenje_status = 'FINISHED'
     96where vozenje_id = (select vozenje_id from project.vozenje where patnik_k_id = 1 and vozenje_status = 'ACTIVE')
    9097  }}}
    9198}}}