-- DROP SCHEMA "Project";

CREATE SCHEMA "Project" AUTHORIZATION db_202122z_va_prj_freeparkingspace_owner;

insert into najava (Korisnicko_ime, EMBG, Br_tel,Email, password, Ime, Prezime)
values('Martina2810', '2810000450196', '078445325', 'Martina2810@gmail.com', 'martin4e1', 'Martina', 'Poposka'),
('Mihaela3810', '1810000450196', '078445387', 'Mihaela3810@gmail.com', 'mihaela@', 'Mihaela', 'Simonoska'),
('Aleksandra4810', '1110000450196', '078445399', 'Aleksandra4810@gmail.com', 'aleksa@!@', 'Aleksandra', 'Efremovska'),
('Elena5810', '1210000450196', '078445324', 'Elena5810@gmail.com','@elena@@', 'Elena', 'Elenoska'),
('Kristina6810', '1310000450196', '078445323', 'Kristina6810@gmail.com','kik@a','Kristina', 'Simeonoska'),
('Simona7810', '1410000450196', '078445322', 'Simona7810@gmail.com','sim@nA','Simona', 'Kamceska'),
('Tamara3811', '1510000450196', '078445321', 'Tamara3811@gmail.com','tAmAr@','Tamara', 'Ivanoska'),
('Angela9810', '1610000450196', '078445320', 'Angela9810@gmail.com','anGel@a','Angela', 'Kiroska'),
('Simeon1810', '1710000450196', '078445329', 'Simeon1810@gmail.com','simeOn#','Simeon', 'Zaev'),
('Majkl0810', '180000450196', '078445328', 'Majkl0810@gmail.com','ma!kL','Majkl', 'Mijalkov'),
('Petar2210', '1910000450196', '078445327', 'Petar2210@gmail.com','peter&','Petar', 'Gruevski'),
('Matea2410', '2810000450196', '078445326', 'Matea2410@gmail.com','mAtEA%','Matea', 'Sekerinska');

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);