source: DB/polnenje.sql

Last change on this file was f5f7c24, checked in by 192011 <mk.snicker@…>, 17 months ago

Initial commit

  • Property mode set to 100644
File size: 7.7 KB
RevLine 
[f5f7c24]1truncate table users cascade;
2truncate table administrators cascade;
3truncate table clients cascade;
4truncate table business_users cascade;
5truncate table companies cascade;
6truncate table contracts cascade;
7truncate table delivery_man cascade;
8truncate table is_responsible_for cascade;
9truncate table locations cascade;
10truncate table models cascade;
11truncate table project.payment_cards cascade;
12truncate table payments cascade;
13truncate table registrations cascade;
14truncate table vehicles cascade;
15
16-- drop schema project cascade;
17
18insert into project.users (user_id,email,username,first_name,last_name,pass,created_on,modified_on) values
19--admins
20(default,'root@root.com','root','root','root','root_pass',now(),null),
21(default,'admin@admin.com','admin','admin','admin','admin12345',now(),null),
22(default,'filip@hotmail.com','gorgievskiff','filip','gorgievski','nekojpasword',now(),null),
23(default,'dario@hotmail.com','dario','dario','mitev','darmitt',now(),null),
24--clients
25(default,'ana@hotmail.com','ana','ana','mladenovska','nekojpasword2',now(),null),
26(default,'daniel@domain.com','daniel_t','daniel','todorov','something1',now(),null),
27(default,'nikola@domain.com','nmitev','nikola','mitev','something2',now(),null),
28(default,'martin@domain.com','mgorgievski','martin','gorgievski','something3',now(),null),
29(default,'marija4@domain.com','marija','marija','ilieva','something4',now(),null),
30(default,'john@gmail.com','john','doe','jdoe','nekojpasword3',now(),null),
31(default,'james@gmail.com','james','james','jones','nekojpasword4',now(),null),
32(default,'daniel@yahoo.com','daniel','daniel','james','djames',now(),null),
33--business users
34(default,'callum_wilson@domain.com','c_wilson','callum','wilson','mypass123',now(),null),
35(default,'business_user1@gmail.com','b_user1','b_user1','b_user1','something5',now(),null),
36(default,'business_user2@gmail.com','b_user2','b_user2','b_user2','something6',now(),null),
37(default,'business_user3@gmail.com','b_user3','b_user3','b_user3','something7',now(),null),
38(default,'test_b_user@gmail.com','test','test','test','something7',now(),null),
39--delivery men
40(default,'leomessi@domain.com','messi','leo','messi','football',now(),null),
41(default,'cronaldo@domain.com','ronaldo','cristiano','ronaldo','football2',now(),null),
42(default,'marko_t@gmail.com','marko_t','marko','todorovski','something9',now(),null),
43(default,'david_g@gmail.com','david_g','david','gorgievski','something10',now(),null);
44
45insert into project.administrators(user_id) values
46(1),(2),(3),(4);
47
48insert into project.clients(user_id) values
49(5),(6),(7),(8),(9),(10),(11),(12);
50
51insert into project.business_users(user_id) values
52(13),(14),(15),(16);
53
54insert into project.companies(company_id,company_name,company_email,created_on,created_by,modified_on,modified_by,business_user_id,administrator_id) values
55(default,'balkanrent','balkanrent@gmail.com',now(),13,null,null,13,1),
56(default,'finkirent','finkirent@gmail.com',now(),14,null,null,14,1),
57(default,'rentmkd','rentmkd@gmail.com',now(),15,null,null,15,2),
58(default,'fastrent','fastrent@gmail.com',now(),16,null,null,16,3);
59
60insert into project.delivery_man (user_id,business_user_id,company_id,salary,date_of_employment) values
61(17,13,1,32000,to_date('1010021','ddmmyyy')),
62(18,14,2,30000,to_date('1010022','ddmmyyy')),
63(19,15,3,32000,to_date('1010021','ddmmyyy')),
64(20,16,4,35000,to_date('2207020','ddmmyyy'));
65
66insert into project.models (model_id,model_name,color,model_year,num_of_seats,num_of_doors,fuel,transmission,vehicle_type,img_src) values
67(default,'i10','white',to_date('2019','yyyy'),5,4,'diesel','manual','mini','https://m.atcdn.co.uk/vms/media/f4ed7d39d30f4f02a9ed5b0649858a2d.jpg'),
68(default,'i10','black',to_date('2021','yyyy'),5,4,'electric','manual','mini','https://m.atcdn.co.uk/vms/media/f4ed7d39d30f4f02a9ed5b0649858a2d.jpg'),
69(default,'C1','black',to_date('2021','yyyy'),5,2,'petrol','automatic','hatchback','https://pentagon-v4.imgix.net/news/175_1630692733.jpg'),
70(default,'Golf','black',to_date('2021','yyyy'),5,4,'diesel','automatic','compact','https://www.alpertourism.com/images/carclass/pngwing.com%20(16).png');
71
72insert into project.registrations (registration_id,plate_num,registred_on,valid_thru,is_available) values
73(default,'AB1731BC',to_date('0202022','ddmmyyy'),to_date('0202023','ddmmyyy'),true),
74(default,'AB2228BC',to_date('0202022','ddmmyyy'),to_date('0202023','ddmmyyy'),true),
75(default,'AB3213BC',to_date('0202022','ddmmyyy'),to_date('0202023','ddmmyyy'),true),
76(default,'AB8238BC',to_date('0202022','ddmmyyy'),to_date('0202023','ddmmyyy'),false),
77(default,'AB0000BB',to_date('2005022','ddmmyyy'),to_date('2005023','ddmmyyy'),true),
78(default,'AB2228DQ',to_date('1110022','ddmmyyy'),to_date('1110023','ddmmyyy'),true);
79
80insert into project.locations (location_id,city,street,street_number,company_id) values
81(default,'Prilep','Some street',10,1),
82(default,'Stip','Stip street',5,1),
83(default,'Vinica','Street in Vinica',4,2),
84(default,'Vinica','Another street in Vinica',14,3),
85(default,'Skopje','Street in Skopje',11,4),
86(default,'Skopje','Another street in Skopje',1,4);
87
88insert into project.vehicles(vehicle_id,chassis_number,vehicle_type,fuel_efficiency,brand,daily_rental_price,company_id,model_id,location_id,registration_id) values
89(default,'SV30-016926612323','sedan','economic','Volkswagen',100.0,1,4,1,1),
90(default,'SV10-016916612323','hatchback','economic','Hyundai',69.0,1,1,2,2),
91(default,'SV10-012916612323','hatchback','economic','Hyundai',105.0,2,2,3,3),
92(default,'SV80-016916610099','SUV','economic','Citroen',99.0,3,3,4,4),
93(default,'SV80-016916619988','SUV','economic','Citroen',95.0,4,3,5,5),
94(default,'SV80-016916614442','sedan','economic','Volkswagen',102.0,4,3,6,6),
95(default,'SV81-016316612323','SUV','economic','Renault',109.0,1,5,9,7),
96(default,'SV81-012316612323','SUV','economic','Renault',109.0,1,6,10,8)
97
98insert into project.payment_cards (card_id,card_number,cvc,valid_thru,holder_name,user_id) values
99(default,'1111222233334444',100,to_date('0101025','ddmmyyy'),'Ana Mladenovska',5),
100(default,'1111222233335555',101,to_date('0201023','ddmmyyy'),'Daniel Todorov',6),
101(default,'1111222233336666',102,to_date('0809023','ddmmyyy'),'Nikola Mitev',7),
102(default,'1111222233330000',102,to_date('0809023','ddmmyyy'),'Martin Gorgievski',8),
103(default,'1111222233333333',102,to_date('0809024','ddmmyyy'),'Marija Ilieva',9),
104(default,'1111222233331111',102,to_date('0809024','ddmmyyy'),'John Doe',10),
105(default,'1111222233332222',102,to_date('0101023','ddmmyyy'),'James Jones',11),
106(default,'1111222233337777',103,to_date('1909026','ddmmyyy'),'Daniel James',12);
107
108insert into project.payments (payment_id,card_id,payment_date,payment_time,amount) values
109(default,1,to_date('0212022','ddmmyyy'),'13:15',400),
110(default,2,to_date('0412022','ddmmyyy'),'17:15',1210),
111(default,3,to_date('1411022','ddmmyyy'),'12:00',150),
112(default,1,to_date('0412022','ddmmyyy'),'13:40',1275),
113(default,2,to_date('0212022','ddmmyyy'),'13:50',2940);
114
115insert 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
116(to_date('1203022','ddmmyyy'),5,13,17,1,1,'angel vinicki',to_date('1303022','ddmmyyy'),to_date('1603022','ddmmyyy'),false,false,false,false),
117(to_date('0412022','ddmmyyy'),6,14,18,2,2,'ilindenska',to_date('0412022','ddmmyyy'),to_date('1412022','ddmmyyy'),false,false,false,false),
118(to_date('1411022','ddmmyyy'),7,15,19,3,3,'partizanska',to_date('1411022','ddmmyyy'),to_date('1611022','ddmmyyy'),false,false,false,false),
119(to_date('0412022','ddmmyyy'),5,16,20,4,1,'ilindenska',to_date('0412022','ddmmyyy'),to_date('2012022','ddmmyyy'),false,false,false,false);
120
121insert into project.is_responsible_for(user_id,vehicle_id) values
122(17,13),(17,14),(18,15),(19,16),(20,17),(20,18);
123
Note: See TracBrowser for help on using the repository browser.