
set search_path = project;

delete from se_naogja2;
delete from se_naogja1;
delete from ja_ima;
delete from so_koi;
delete from opsluzuva;
delete from od_kade;
delete from sodrzi;
delete from pripagja;
delete from zadolzen_za;

delete from komentari;
delete from naracki;
delete from sliki;
delete from posetiteli;
delete from vraboteni;
delete from korisnici;
delete from restorani;
delete from lokacii;
delete from prodavnici;
delete from recepti;
delete from potekla;
delete from sostojki;
delete from kategorii;

insert into kategorii (kat_id, kat_ime, opis) values 
	(1, 'Пред јадење', 'Опис на категоријата пред јадење'),
	(2, 'Главно јадење', 'Опис на категоријата главно јадење'),
	(3, 'Десерт', 'Опис на категоријата десерт'),
	(4, 'Доручек', 'Опис на категоријата Доручек');
	
insert into sostojki (s_id, s_naziv) values
	(1, 'Млеко'),
	(2, 'Брашно'),
	(3, 'Јајца'),
	(4, 'Шеќер'),
	(5, 'Сол'),
	(6, 'Пилешки стек');
	
insert into potekla (pot_id, pot_naziv) values 
	(1, 'Медитеранско'),
	(2, 'Азиско'),
	(3, 'Индијско'),
	(4, 'Африканско'),
	(5, 'Европско' );
	
insert into recepti (rec_id, postapka, rec_ime) values
	(1, 'Начин на подготовка 1', 'Бајадера'),
	(2, 'Начин на подготовка 2', 'Крофни'),
	(3, 'Начин на подготовка 3', 'Баничка со јаболка'),
	(4, 'Начин на подготовка 4', 'Сок од боровики');
	
insert into prodavnici (pro_id, pro_naziv) values 
	(1, 'Тинекс'),
	(2, 'Веро'),
	(3, 'Рамстор'),
	(4, 'Кид го');

insert into lokacii (l_id, adresa) values 
	(1, 'Улица 1 бр. 1 / 1'),
	(2, 'Улица 2 бр. 2 / 2'),
	(3, 'Улица 3 бр. 3 / 3'),
	(4, 'Улица 4 бр. 4 / 4'),
	(5, 'Улица 5 бр. 5 / 5');

insert into restorani (res_id, res_naziv) values 
	(1, 'Дома'),
	(2, 'Ресторан 1'),
	(3, 'Ресторан 2'),
	(4, 'Ресторан 3');

insert into korisnici (telefon, kor_ime, prezime) values 
	('070000000', 'Александар', 'Блажевски'),
	('071000000', 'Кристијан', 'Мирковски'),
	('072000000', 'Бојана', 'Крстева'),
	('073000000', 'Марко', 'Андревски'),
	('074000000', 'Ана Марија', 'Тодорова'),
	('075000000', 'Ѓорѓи', 'Скендеровски'),
	('076000000', 'Некој', 'Човек');

insert into vraboteni (telefon) values 
	('070000000'),
	('072000000'),
	('074000000');

insert into posetiteli (telefon) values 
	('071000000'),
	('073000000'),
	('076000000');

insert into sliki (reden_broj, rec_id, slika) values 
	(1, 1, 'slika1ZaRec1'),
	(2, 1, 'slika2ZaRec1'),
	(3, 1, 'slika3ZaRec1'),
	(1, 2, 'slika1ZaRec2'),
	(1, 3, 'slika1ZaRec3'),
	(1, 4, 'slika1ZaRec4');

insert into naracki (vreme, telefon) values 
	('2023-12-04 11:30:30', '071000000'),
	('2023-12-04 12:32:24', '073000000'),
	('2023-12-09 18:30:30', '071000000'),
	('2023-12-10 11:30:30', '073000000'),
	('2023-12-11 20:30:00', '071000000'),
	('2023-12-11 09:07:50', '071000000'),
	('2023-12-13 09:20:47', '076000000');
	
insert into komentari (kom_data, telefon, rec_id, ocena, text) values 
	('2023-12-04 12:32:24', '071000000', 2, 9, 'Многу бил задоволено од крофните'),
	('2023-12-10 11:50:30', '073000000', 4, 2, 'Сокот бил редок'),
	('2023-12-13 09:20:47', '076000000', 3, 8, 'Ок');

--relacii

insert into zadolzen_za (v_telefon, vreme, p_telefon) values
	('070000000', '2023-12-04 11:30:30', '071000000'),
	('070000000', '2023-12-04 12:32:24', '073000000'),
	('072000000', '2023-12-09 18:30:30', '071000000'),
	('072000000', '2023-12-10 11:30:30', '073000000'),
	('070000000', '2023-12-11 20:30:00', '071000000'),
	('070000000', '2023-12-11 09:07:50', '071000000'),
	('072000000', '2023-12-13 09:20:47', '076000000');


insert into pripagja (kat_id, rec_id) values 
	(3, 1),
	(2, 3),
	(3, 4);


insert into sodrzi (s_id, rec_id) values 
	(1, 2),
	(2, 2),
	(3, 2),
	(4, 2),
	(1, 1),
	(2, 1),
	(5, 1),
	(4, 1),
	(2, 3),
	(3, 3),
	(4, 3);

insert into od_kade (pot_id, rec_id) values 
	(5, 1),
	(5, 3),
	(3, 2),
	(1, 4);
	

insert into opsluzuva (res_id, rec_id) values 
	(1, 1),
	(2, 3),
	(3, 2),
	(4, 4);

insert into so_koi (vreme, telefon, rec_id, nacin) values 
	('2023-12-04 11:30:30', '071000000', 2, 'Готово'),
	('2023-12-04 11:30:30', '071000000', 1, 'Состојки'),
	('2023-12-10 11:30:30', '073000000' , 4, 'Состојки'),
	('2023-12-13 09:20:47', '076000000', 1, 'Состојки'),
	('2023-12-04 12:32:24', '073000000', 3, 'Состојки'),
	('2023-12-09 18:30:30', '071000000', 2, 'Готово'),
	('2023-12-11 20:30:00', '071000000', 2, 'Готово'),
	('2023-12-11 09:07:50', '071000000', 2, 'Состојки');

insert into ja_ima (s_id, pro_id, kolicina, cena) values 
	(1, 1, '1l', 67),
	(1, 2, '800ml', 50),
	(2, 3, '4kg', 120),
	(2, 1, '1kg', 30),
	(4, 4, '800g', 60),
	(3, 4, '10', 90),
	(5, 2, '800g', 50),
	(6, 3, '1kg', 220);

insert into se_naogja1 (res_id, l_id) values 
	(1, 1),
	(2, 2),
	(3, 3),
	(4, 4);

insert into se_naogja2 (pro_id, l_id) values 
	(1, 5),
	(2, 2),
	(3, 3),
	(4, 4);








