-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblueprint.txt
71 lines (56 loc) · 1.37 KB
/
blueprint.txt
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
login
admin
products
view all
search by tag
see all categories
delete
change name
change descr
change img src
change stock
see comments
delete comment
add product
add tags -> update 'tag', 'tagProduct'
customers
view all //address also
delete
see ordr (history)
comments
search by pid
search by cid
delete comment
ordr
view all orders
change orderstatus
user(session)
see own profile
change name/gender/password/dob/phoneno/billadd/deliveryadd
products
search by tag / categories -> name, desc, price, image, in stock or not
see comments
add comment
see rating
add rating
add to basket -> ask quantity
basket
view -> all products, total cost -> option to delete from basket
view-> pname, quantity
chckout
add to ordr, empty basket, decrease stock
ordr
view history / view status of current ordr
view-> orderId, all ordered products, status
filters
by price
by brand
exclude out of stock
products view order-> chronological/ by rating / by price
delimiter |
create trigger update_basket before insert on basketprods for each row
begin
update basketprods set quantity = quantity + new.quantity where new.pid=basketprods.PID and new.bid=basketprods.BID
update basket set totalcost= totalcost + pprice*new.quantity from product,basket where product.PID=new.pid and new.bid=basket.BID
end |
delimiter;