-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_struct.txt
79 lines (71 loc) · 2.74 KB
/
data_struct.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
76
77
78
79
TODO
====
- remind to save on member update page if any changes was made.
- change icon
- add back button for mbr-info and mbr-rebate
Database Structure > v 0.2.0 (calc.dat2)
========================================
1. mbr
_id (str): nedb primary key.
_addDate (int): the real date for member added. e.g. 20150913
_rmDate (int): this should be the real date. _`MUST NOT`_ exists if mbr not yet removed.
_day (int): enum(10, 20, 30), which day this mbr belongs to.
mbrName (str): Member name.
mbrId (str, null): Member id.
mbrIc (str, null): Member IC.
mbrEmail (str, null): Member email.
mbrBankName (str, null): Member bank name.
mbrBankAcc (str, null): Member bank account number.
mbrJoinDate (str, null): Member join date.
mbrPackage (str, null): Member package.
mbrRemark (str, null): Member remark.
mbrRebate1 (Array<object>, null): [{mbrDay: 10, mbrName: "Member 1", mbrPackage: 10000.50}, ...]
mbrRebate2 (Array<object>, null): [{mbrDay: 10, mbrName: "Member 2", mbrPackage: 10.50}, ...]
mbrRebate3 (Array<object>, null): [{mbrDay: 20, mbrName: null, mbrPackage: null}, ...]
2. profit (always one record only)
_id (str): 'profit'.
mbrProfit10 (float, null): Profit value for day 10.
mbrProfit20 (float, null): Profit value for day 20.
mbrProfit30 (float, null): Profit value for day 30.
mbrFilt10_10 (float, null): Member filter percetage for day 10, filt 10.
mbrFilt10_20 (float, null): Member filter percetage for day 10, filt 20.
mbrFilt10_30 (float, null): Member filter percetage for day 10, filt 30.
mbrFilt20_10 (float, null): Member filter percetage for day 20, filt 10.
mbrFilt20_20 (float, null): Member filter percetage for day 20, filt 20.
mbrFilt20_30 (float, null): Member filter percetage for day 20, filt 30.
mbrFilt30_10 (float, null): Member filter percetage for day 30, filt 10.
mbrFilt30_20 (float, null): Member filter percetage for day 30, filt 20.
mbrFilt30_30 (float, null): Member filter percetage for day 30, filt 30.
Database Structure prior v 0.2.0 (calc.dat)
===========================================
1. mbr
_doc (str) 'mbr'
_startDate (int) when this mbr inserted and start functioning
_endDate (int) null if nothing.
_day (int) 10, 20, 30
mbrName (str)
mbrId (str)
mbrIc (str)
mbrEmail (str)
mbrBankName (str)
mbrBankAcc (str)
mbrJoinDate (str)
mbrPackage (float)
mbrRemark (str)
2. profit
_doc (str) 'profit'
_date (int) when is this profit belongs to
mbrProfit (float)
3. rebate-mbr
_doc (str) 'rebate-mbr'
mbr_id (str)
mbrPct (int) 3, 2, 1
mbr (Array<Object>) [{mbrDate: 10, mbrName: "user name"}]
4. rebate-package
_doc = 'rebate-package'
_date (int) 20160930
mbr_id (str)
mbrPct (int) 3, 2, 1
mbrPackage (Array<int>) [1000, 2000, ...]
Events
======