1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
insert into webs.category (`name`) values
("Verse fruit en groenten"),
("Boeken"),
("Overig");
insert into webs.product (`name`, `price`, `category`, `image`) values
("Appel", 0.90, 1, true),
("Banaan", 1.10, 1, true),
("Peer", 0.99, 1, true),
("ハリネズミのハリー 第1巻", 5.99, 2, true),
("ハリネズミのハリー 第2巻", 5.99, 2, false),
("ハリネズミのハリー 第3巻", 5.99, 2, false),
("イジらないで、長瀞さん 第1巻", 5.49, 2, false),
("イジらないで、長瀞さん 第2巻", 5.49, 2, false),
("Kip", 9.95, 3, true),
("Kikker", 19.95, 3, true);
update webs.product set description = "<ul><li>lekker sappig</li><li>zonder BTW</li></ul>" where id = 1;
update webs.product set description = "<ul><li>snel bruin</li><li>zonder BTW</li></ul>" where id = 2;
update webs.product set description = "<ul><li>kurkdroog</li><li>zonder BTW</li></ul>" where id = 3;
insert into webs.user (`name`, `hash`) values
("loek", "$2b$12$HuKuEfTuD081gi8/VWtAl.WwpfD6MM6fAekxng22wwquoIyiK1zGC"), -- gert123
("bert", "$2b$12$s8ag3gsHThqIZUzqzfcX8O.v4mXfMAeu2G4X51nQOesmVPuXl0hse"), -- win32
("niels", "$2b$12$4JDIzpWAQpz3Iv9IdiwNzOoeSx0IPnDiO6EMVOz6knW8JGhm60wPO"), -- bsod
("joshua", "$2b$12$CrBgZljVGYHZt.xF.HWziOgwD9qL7jMxfHh6.fXxO55rbwtoRXYM6"), -- darwin
("willem", "$2b$12$vCDpn5fnGBL7dv3Ty1cgZegDKOguoRIgHNrUFYOCWoensgI4HnJde"); -- biege
update webs.user set `privileges` = 1073741824 where `name` = "loek";
insert into webs.promotion (`product`, `price_buff`, `count_buff`) values
(1, 0.80, 1), -- 20% korting
(2, 0.50, 2), -- 1+1 gratis
(3, 0.6666666, 3), -- 2+1 gratis
(4, 0.50, 4), -- 2+2 gratis
(5, 0.75, 4), -- 3+1 gratis
(6, 0.80, 4), -- ????
(7, 0.50, 6); -- 50% korting per 6-pack
set @order_id = webs.cart(1); -- cart id voor loek
insert into webs.orderproduct (`product`, `count`, `order`) values
(4, 1, @order_id),
(5, 1, @order_id),
(6, 1, @order_id),
(7, 1, @order_id),
(8, 1, @order_id);
|