
set search_path = "project";

delete from "project".package;
delete from "project"."policy";
delete from "project".pol_dog;
delete from "project".auto_pol;
delete from "project".travel_pol;
delete from "project".pol_osi;
delete from "project".vehicle;
delete from "project".covers;
delete from "project".payment;
delete from "project".property_pol;
delete from "project".property;



insert into project.package  (code, title,  total, valuet) values 
(1, 'Package Gold',  15000, 'Den'),
(2, 'Package Gold1',  18000, 'Den'),
(3, 'Package Gold2',  25000, 'Den');


insert into project."policy" (p_id,sdate,edate,package) values 
(1, '20231221','20241220',1),
(2, '20231212','20231220',2),
(3, '20231205','20231210',3);



insert into project.pol_dog (d_embg,c_id,"name","policy",surname,birthdate,kontakt) values
(290699945,2,'Ardit',1,'Ameti','19990629','070926854'),
(290699900,3,'Dragana',2,'Stojanovic','20000105','070852654'),
(290699942,2,'Ardit',3,'Ameti','19990629','070926854');


insert into project.auto_pol  (a_id,pol_id) values 
(1,1),
(2,3);


insert into project.travel_pol  (tr_id, pol_id) values 
(1,2);


insert into project.pol_osi (o_embg ,"policy","name",surname,birthdate,kontakt) values 
(290699900,1,'Dragana','Stojanovic','20000105','070852654');

insert into project.vehicle (v_id,"policy","type",marka,model,license_plate) values 
(1,1,'avto','BMW','x1','sk0869bc'),
(2,2,'bus','volvo','tmpx2','sk7469ap');

insert into project.covers (cov_id, cov_amount, package, "cov_type") values 
(1,1000,1,'travel'),
(2.1500,2,'vehicle'),
(3,2000,3,'property');

insert into project.payment (payment_num, "policy", p_date,p_amount,) values 
(1,1,'20241012',21000),
(2,2,'20240911',25000),
(3,3,'20240205',19000);

insert into project.property_pol (pr_id,pol_id) values 
(1,3);

insert into project.property (prop_id,"policy","address",floor,year_build,security) values 
(1,3,'Skopje,Butel 2,Rokomija 49',2,'20021001',1)
(2,3,'Kumanovo,11 Oktomvri,Br 1',2,'20050811',0)