
truncate table administrators cascade;
truncate table clients cascade;
truncate table business_users cascade;
truncate table companies cascade;
truncate table contracts cascade;
truncate table delivery_man cascade;
truncate table is_responsible_for cascade; 
truncate table locations cascade;
truncate table models cascade;
truncate table payments cascade;
truncate table registrations cascade;
truncate table vehicles cascade;

insert into project.administrators(user_id) values 
(1),(2),(3),(4);

insert into project.clients(user_id) values 
(5),(6),(7),(8),(9),(10),(11),(12);

insert into project.business_users(user_id) values 
(13),(14),(15),(16);

insert into project.companies(company_id,company_name,company_email,created_on,created_by,modified_on,modified_by,business_user_id,administrator_id) values 
(default,'balkanrent','balkanrent@gmail.com',now(),13,null,null,13,1),
(default,'finkirent','finkirent@gmail.com',now(),14,null,null,14,1),
(default,'rentmkd','rentmkd@gmail.com',now(),15,null,null,15,2),
(default,'fastrent','fastrent@gmail.com',now(),16,null,null,16,3);

insert into project.delivery_man (user_id,business_user_id,company_id,salary,date_of_employment) values 
(17,13,1,32000,to_date('1010021','ddmmyyy')),
(18,14,2,30000,to_date('1010022','ddmmyyy')),
(19,15,3,32000,to_date('1010021','ddmmyyy')),
(20,16,4,35000,to_date('2207020','ddmmyyy'));

insert into project.models (model_id,model_name,color,model_year,num_of_seats,num_of_doors,fuel,transmission,vehicle_type,img_src) values
(default,'i10','white',to_date('2019','yyyy'),5,4,'diesel','manual','mini','https://m.atcdn.co.uk/vms/media/f4ed7d39d30f4f02a9ed5b0649858a2d.jpg'),
(default,'i10','black',to_date('2021','yyyy'),5,4,'electric','manual','mini','https://m.atcdn.co.uk/vms/media/f4ed7d39d30f4f02a9ed5b0649858a2d.jpg'),
(default,'C1','black',to_date('2021','yyyy'),5,2,'petrol','automatic','hatchback','https://pentagon-v4.imgix.net/news/175_1630692733.jpg'),
(default,'Golf','black',to_date('2021','yyyy'),5,4,'diesel','automatic','compact','https://www.alpertourism.com/images/carclass/pngwing.com%20(16).png');

insert into project.registrations (registration_id,plate_num,registred_on,valid_thru,is_available) values
(default,'AB1731BC',to_date('0202022','ddmmyyy'),to_date('0202023','ddmmyyy'),true),
(default,'AB2228BC',to_date('0202022','ddmmyyy'),to_date('0202023','ddmmyyy'),true),
(default,'AB3213BC',to_date('0202022','ddmmyyy'),to_date('0202023','ddmmyyy'),true),
(default,'AB8238BC',to_date('0202022','ddmmyyy'),to_date('0202023','ddmmyyy'),false),
(default,'AB0000BB',to_date('2005022','ddmmyyy'),to_date('2005023','ddmmyyy'),true),
(default,'AB2228DQ',to_date('1110022','ddmmyyy'),to_date('1110023','ddmmyyy'),true);

insert into project.locations (location_id,city,street,street_number,company_id) values 
(default,'Prilep','Some street',10,1),
(default,'Stip','Stip street',5,1),
(default,'Vinica','Street in Vinica',4,2),
(default,'Vinica','Another street in Vinica',14,3),
(default,'Skopje','Street in Skopje',11,4),
(default,'Skopje','Another street in Skopje',1,4);

insert into project.payments (payment_id,card_id,payment_date,payment_time,amount) values 
(default,1,to_date('0212022','ddmmyyy'),'13:15',400),
(default,2,to_date('0412022','ddmmyyy'),'17:15',1210),
(default,3,to_date('1411022','ddmmyyy'),'12:00',150),
(default,1,to_date('0412022','ddmmyyy'),'13:40',1275),
(default,2,to_date('0212022','ddmmyyy'),'13:50',2940);

insert into project.contracts(signed_date,user_id,vehicle_id,delivery_man_id,payment_id,card_id,address,start_date,end_date,has_navigation,has_baby_seat,has_green_card,has_roofrack) values
(to_date('1203022','ddmmyyy'),5,13,17,1,1,'angel vinicki',to_date('1303022','ddmmyyy'),to_date('1603022','ddmmyyy'),false,false,false,false),
(to_date('0412022','ddmmyyy'),6,14,18,2,2,'ilindenska',to_date('0412022','ddmmyyy'),to_date('1412022','ddmmyyy'),false,false,false,false),
(to_date('1411022','ddmmyyy'),7,15,19,3,3,'partizanska',to_date('1411022','ddmmyyy'),to_date('1611022','ddmmyyy'),false,false,false,false),
(to_date('0412022','ddmmyyy'),5,16,20,4,1,'ilindenska',to_date('0412022','ddmmyyy'),to_date('2012022','ddmmyyy'),false,false,false,false);

insert into project.is_responsible_for(user_id,vehicle_id) values
(17,13),(17,14),(18,15),(19,16),(20,17),(20,18);

