Project

General

Profile

Customer Database » History » Version 2

Ryan Supawarapong, 03/16/2026 01:45 PM

1 1 Ryan Supawarapong
# Customer Database
2
3
4
```
5
6
Table appman {
7
  id int
8
  verification string
9
  attribute_id int
10
}
11
12
Table appman_attribute {
13
  id int
14
}
15
16
Ref: appman_attribute.id - appman.attribute_id
17
18
Table identity {
19
  id uuid
20
  customer_code int
21
  fullname_id int
22
  current_address_id int
23
  register_address_id int
24
  work_address_id int
25
  suite_test_id int
26 2 Ryan Supawarapong
  occupation_id int
27
  education_id int
28
  workplace_id int
29
  income_id int
30 1 Ryan Supawarapong
  customer_type int
31
}
32
33
Table fullname {
34
  id int
35
  th_first_name string
36
  th_middle_name string
37
  th_last_name string
38
  en_first_name string
39
  en_middle_name string
40
  en_last_name string
41
}
42
43
Table address {
44
  id int
45
  house_number string
46
  floor string
47
  village_building string
48
  sub_street strign
49
  street strign
50
  country_code string
51
  location_id  int
52
}
53
54
55
Table location {
56
  id int
57
  code int
58
  zipcode string
59
}
60
61 2 Ryan Supawarapong
62 1 Ryan Supawarapong
Ref: location.id < address.location_id
63
64
Ref: fullname.id - identity.fullname_id
65
Ref: address.id - identity.current_address_id 
66
Ref: address.id - identity.register_address_id
67
Ref: address.id - identity.work_address_id
68
Ref: suitetest.id - identity.suite_test_id
69 2 Ryan Supawarapong
Ref: education.id - identity.education_id
70
Ref: occupation.id - identity.occupation_id
71
Ref: workplace.id - identity.workplace_id
72
Ref: income.id - identity.income_id
73 1 Ryan Supawarapong
74
Table suitetest {
75
  id int
76
}
77
78
Table suitetest_question {
79
  id int
80
  value string
81
}
82
83 2 Ryan Supawarapong
Table suitetest_answer {
84
  id int
85
  suitetest_id int [ref: > suitetest.id]
86
  question_id int [ref: > suitetest_question.id]
87
  value stirng
88
}
89 1 Ryan Supawarapong
90 2 Ryan Supawarapong
91
Table occupation {
92
  id int
93
  code string
94
  value string
95
}
96
97
Table education {
98
  id int
99
  code string
100
  value string
101
}
102
103
Table income {
104
  id int
105
  code string
106
  range string
107
}
108
109
Table workplace {
110
  id int
111
  position string
112
  name string
113
}
114
115
// ----------------------
116
117
Table verification {
118
  id uuid
119
  email_id int
120
  mobile_id int
121
  appman_id int
122
  cdd_id int
123
  step int
124
}
125
126
Table mobile {
127
  id int
128
  value string
129
}
130
131
Table email {
132
  id int
133
  value string
134
}
135
136
Table cdd {
137
  id int
138
  face_compare_pass bool
139
  mule string
140
  freeze_04 string
141
  freeze_05 string
142
  pep bool
143
  pep_message string
144
  dopa bool
145
}
146
147
Ref: mobile.id - verification.mobile_id
148
Ref: email.id - verification.email_id
149
Ref: appman.id - verification.appman_id
150
Ref: cdd.id - verification.cdd_id
151 1 Ryan Supawarapong
152
```