Skip to content

Commit cd60905

Browse files
Create db.json
1 parent 4f8eef2 commit cd60905

File tree

1 file changed

+249
-0
lines changed

1 file changed

+249
-0
lines changed

_db_/core/db.json

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
[
2+
{
3+
"table": "user",
4+
"action": "create",
5+
"schema": {
6+
"alias": "string",
7+
"site_id": "integer",
8+
"login": "string",
9+
"password": "string",
10+
"role": "string",
11+
"email": "string",
12+
"phone": "string",
13+
"cookie": "string",
14+
"language": "string",
15+
"state": "integer"
16+
},
17+
"relations": {
18+
"user_data": {
19+
"type": "hasMany",
20+
"keys": {
21+
"local": "id",
22+
"foreign": "user_id"
23+
}
24+
},
25+
"cart": {
26+
"type": "hasMany",
27+
"keys": {
28+
"local": "id",
29+
"foreign": "user_id"
30+
}
31+
}
32+
}
33+
},
34+
{
35+
"table": "user_data",
36+
"action": "create",
37+
"schema": {
38+
"user_id": "string",
39+
"alias": "string",
40+
"account_type": "integer",
41+
"fname": "string",
42+
"iname": "string",
43+
"oname": "string",
44+
"rating": "integer",
45+
"balans": "integer",
46+
"credit_limit": "integer",
47+
"payment_mode": "integer",
48+
"payment_method": "integer",
49+
"state_verified": "integer",
50+
"user_verification": "integer",
51+
"bonus_code": "string",
52+
"referral_code": "string",
53+
"promocode": "string",
54+
"country_id": "integer",
55+
"country_name": "string",
56+
"city_id": "integer",
57+
"city_name": "string",
58+
"region_id": "integer",
59+
"district": "string",
60+
"district_id": "integer",
61+
"prefix": "string",
62+
"street": "string",
63+
"street_id": "integer",
64+
"build": "string",
65+
"parade": "string",
66+
"floor": "string",
67+
"apart": "string",
68+
"description": "string",
69+
"email_confirmation": "string",
70+
"register_newsletter": "integer",
71+
"terms_and_conditions": "integer",
72+
"created": "string",
73+
"visited": "string",
74+
"modified": "string"
75+
},
76+
"relations": {
77+
"user": {
78+
"type": "belongsTo",
79+
"keys": {
80+
"local": "user_id",
81+
"foreign": "id"
82+
}
83+
},
84+
"cart": {
85+
"type": "hasMany",
86+
"keys": {
87+
"local": "id",
88+
"foreign": "user_data_id"
89+
}
90+
}
91+
}
92+
},
93+
{
94+
"table": "cart",
95+
"action": "create",
96+
"schema": {
97+
"user_id": "integer",
98+
"user_data_id": "integer",
99+
"alias": "string"
100+
},
101+
"relations": {
102+
"user": {
103+
"type": "belongsTo",
104+
"keys": {
105+
"local": "user_id",
106+
"foreign": "id"
107+
}
108+
}
109+
}
110+
},
111+
{
112+
"table": "cart_product",
113+
"action": "create",
114+
"schema": {
115+
"cart_id": "integer",
116+
"user_id": "integer",
117+
"product_id": "integer",
118+
"alias": "string",
119+
"created": "string",
120+
"modified": "string"
121+
},
122+
"relations": {
123+
"cart": {
124+
"type": "belongsTo",
125+
"keys": {
126+
"local": "cart_id",
127+
"foreign": "id"
128+
}
129+
},
130+
"user": {
131+
"type": "belongsTo",
132+
"keys": {
133+
"local": "user_id",
134+
"foreign": "id"
135+
}
136+
},
137+
"product": {
138+
"type": "hasMany",
139+
"keys": {
140+
"local": "product_id",
141+
"foreign": "id"
142+
}
143+
}
144+
}
145+
},
146+
{
147+
"table": "order",
148+
"action": "create",
149+
"schema": {
150+
"cart_id": "integer",
151+
"user_id": "integer",
152+
"user_data_id": "integer",
153+
"alias": "string"
154+
},
155+
"relations": {
156+
"user": {
157+
"type": "belongsTo",
158+
"keys": {
159+
"local": "user_id",
160+
"foreign": "id"
161+
}
162+
},
163+
"user_data": {
164+
"type": "belongsTo",
165+
"keys": {
166+
"local": "user_data_id",
167+
"foreign": "id"
168+
}
169+
},
170+
"cart": {
171+
"type": "belongsTo",
172+
"keys": {
173+
"local": "cart_id",
174+
"foreign": "id"
175+
}
176+
}
177+
}
178+
},
179+
{
180+
"table": "product",
181+
"action": "create",
182+
"schema": {
183+
"priority": "integer",
184+
"brand_id": "integer",
185+
"serie_id": "integer",
186+
"type_id": "integer",
187+
"mod_id": "integer",
188+
"description_id": "integer",
189+
"supplier_id": "integer",
190+
"pay_online": "integer",
191+
"available": "integer",
192+
"state": "integer"
193+
},
194+
"relations": {
195+
"property": {
196+
"type": "hasMany",
197+
"keys": {
198+
"local": "id",
199+
"foreign": "product_id"
200+
}
201+
},
202+
"product_view": {
203+
"type": "hasMany",
204+
"keys": {
205+
"local": "id",
206+
"foreign": "product_id"
207+
}
208+
}
209+
}
210+
},
211+
{
212+
"table": "property",
213+
"action": "create",
214+
"schema": {
215+
"product_id": "integer",
216+
"property_id": "integer",
217+
"individual": "integer",
218+
"propertyvalue_id": "integer",
219+
"state": "integer"
220+
},
221+
"relations": {
222+
"product": {
223+
"type": "belongsTo",
224+
"keys": {
225+
"local": "product_id",
226+
"foreign": "id"
227+
}
228+
}
229+
}
230+
},
231+
{
232+
"table": "product_view",
233+
"action": "create",
234+
"schema": {
235+
"product_id": "integer",
236+
"browse_hits": "integer",
237+
"details_hits": "integer"
238+
},
239+
"relations": {
240+
"product": {
241+
"type": "belongsTo",
242+
"keys": {
243+
"local": "product_id",
244+
"foreign": "id"
245+
}
246+
}
247+
}
248+
}
249+
]

0 commit comments

Comments
 (0)