-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelation-analysis.txt
75 lines (66 loc) · 1.79 KB
/
relation-analysis.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
72
73
74
75
TransactionDTOResponse (Consumed from user/client)
1. Customer will choose the desired products to cart check out
2. Front end will wrap those productID along with customerID in a single request containing :
- customerID
- productID
- quantity
3. Backend (us) will have to execute the process using batch query :
1. Create a single Transaction with the corresponding customerID and transaction timestamp
2. Inserting products and the quantity into the transaction_detail table
4. The JSON file will look like this :
Option A :
[
{
customerID : *****,
productID : *****,
quantity : **
},
{
customerID : *****,
productID : *****,
quantity : **
},
...
]
Option B :
{
customerID : *****,
orders :
[
{
productID : ****,
quantity : *****
},
{
productID : ****,
quantity : *****
},
...
]
}
TransactionDTORequest (Produced for user/client)
To give necessary information about the transaction we just have to response with this JSON :
{
customerID : *****,
transactionDate : *****,
orders : [
{
productName : *****,
price : *****,
quantity : *****,
totalPrice : **********
},
{
productName : *****,
price : *****,
quantity : *****,
totalPrice : **********
}
...
]
}
We provide the information of price and quantity with the aggregation of the total price to optimize front-end performance
The POJO will have these properties :
- customerID
- transactionDate
- orders