-- DROP SCHEMA "Project";

CREATE SCHEMA "Project" AUTHORIZATION db_202122z_va_prj_freeparkingspace_owner;

insert into vraboten (Uloga, korisnicko_ime)
values('Administrator','Martina2810'),
('Administrator','Mihaela3810'),
('Administrator','Aleksandra4810'),
('kancelar','Kristina6810'),
('kancelar','Tamara3811'),
('kancelar','Simona7810'),
('kontroler','Elena5810'),
('kontroler','Angela9810'),
('kontroler','Simeon1810');


insert into administrator(Korisnicko_ime)
values ('Martina2810'),
('Mihaela3810'),
('Aleksandra4810');


insert into kontroler( Korisnicko_ime)
values ('Elena5810'),
('Angela9810'),
('Simeon1810');

insert into kancelar(Korisnicko_ime)
values('Kristina6810'),
('Tamara3811'),
('Simona7810');

insert into Ime_na_parking (Id_ime,Lokacija,Administrator_Korisnicko_ime)
values(1,'Bunjakovec','Martina2810'),
(2,'Kapistec','Mihaela3810'),
(3,'Centar','Aleksandra4810');

insert into Zona (Id_zona, Ime_na_parking_Id_ime)
values('A1',1),
('A2',1),
('A3',1);

insert into Parking_mesto(Broj_na_pmesta, Idzona)
values(1,'A1'),
(2,'A1'),
(3,'A1');

insert into Korisnik( Korisnicko_ime)
values('Majkl0810'),
('Petar2210'),
('Matea2410');

insert into Avtomobil(Reg_tablica, Marka, Boja, Korisnickoime)
values('SK-2410-AZ','Mercedes','CrnaMetalic','Matea2410'),
('BT-2210-AZ','BMW','Bela','Petar2210'),
('OH-0810-AZ','YUGO','ROZOVA','Majkl0810');


insert into Plakjanje(Id_plakanje,Korisnickoime, Br_na_smetka,tip_plakjanje)
values
(113,'Petar2210','21050133','karticka'),
(114,'Majkl0810','21050171','karticka');


insert into Plakjanje(Id_plakanje,Korisnickoime, br_tel,tip_plakjanje)
values (112,'Matea2410','078445326','mobilno');


insert into Kazna(Id_kazna, iznos, broj_kazni, Korisnickoime)
values(1,5100,2,'Matea2410'),
(2,2550,1,'Petar2210'),
(3,15980,4,'Majkl0810');

insert into Rezervacija(Id_rezervacija, pocetno_vreme, krajno_vreme, Reg_tablica, Broj_na_pmesta, Id_plakanje)
values(201,now() + interval '1 hour',now() + interval '3 hours','SK-2410-AZ',1,112),
(202,now() + interval '4 hours',now() + interval '5 hours','BT-2210-AZ',2,113),
(203,now() + interval '3 hour',now() + interval '8 hours','OH-0810-AZ',3,114);


insert into Kontrola (izvrsena_kontrola, vreme_na_kontrola, konstantacija, Korisnicko_ime, Broj_na_pmesta, Id_rezervacija, Id_kazna)
values(1,now() + interval'10 minutes','Pogresno parkiranje','Elena5810',1,201,1),
(2,now() + interval'15 minutes','Zafateno pogresno parking mesto','Angela9810',2,202,2),
(3,now() + interval'13 minutes','Go ostetil voziloto na sosedniot parking','Simeon1810',3,203,3);