-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_db.sql
More file actions
384 lines (372 loc) · 14 KB
/
admin_db.sql
File metadata and controls
384 lines (372 loc) · 14 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
/*
Navicat Premium Data Transfer
Source Server : 127.0.0.1
Source Server Type : MongoDB
Source Server Version : 40406
Source Host : localhost:27017
Source Schema : admin_db
Target Server Type : MongoDB
Target Server Version : 40406
File Encoding : 65001
Date: 30/06/2021 17:26:49
*/
// ----------------------------
// Collection structure for categorys
// ----------------------------
db.getCollection("categorys").drop();
db.createCollection("categorys");
// ----------------------------
// Documents of categorys
// ----------------------------
db.getCollection("categorys").insert([ {
_id: ObjectId("60d43efd410d483f08d2ad8b"),
parentId: "0",
name: "家电",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d43f1c410d483f08d2ad8c"),
parentId: "0",
name: "手机、运营商、数码",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d43f28410d483f08d2ad8d"),
parentId: "0",
name: "电脑、办公",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d43f58410d483f08d2ad8e"),
parentId: "0",
name: "家居、家具、家装、厨具",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d43f79410d483f08d2ad8f"),
parentId: "0",
name: "男装、女装、童装、内衣",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d440df410d483f08d2ad90"),
parentId: "0",
name: "美妆、个护清洁、宠物",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d440f4410d483f08d2ad91"),
parentId: "0",
name: "女鞋、箱包、钟表、珠宝",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d440fe410d483f08d2ad92"),
parentId: "0",
name: "男鞋、运动、户外",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d4410a410d483f08d2ad93"),
parentId: "0",
name: "房产、汽车、汽车用品",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d44119410d483f08d2ad94"),
parentId: "0",
name: "母婴、玩具乐器",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d4412a410d483f08d2ad95"),
parentId: "0",
name: "食品、酒类、生鲜、特产",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d4413f410d483f08d2ad96"),
parentId: "0",
name: "艺术、礼品鲜花、农资绿植",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d4414e410d483f08d2ad97"),
parentId: "0",
name: "医药保健、计生情趣",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d4415b410d483f08d2ad98"),
parentId: "0",
name: "图书、文娱、教育、电子书",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d4416e410d483f08d2ad99"),
parentId: "0",
name: "机票、酒店、旅游、生活",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d4417e410d483f08d2ad9a"),
parentId: "0",
name: "理财、众筹、白条、保险",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d44184410d483f08d2ad9b"),
parentId: "0",
name: "工业品",
__v: NumberInt("0")
} ]);
db.getCollection("categorys").insert([ {
_id: ObjectId("60d44193410d483f08d2ad9c"),
parentId: "0",
name: "安装、维修、清洗、二手",
__v: NumberInt("0")
} ]);
// ----------------------------
// Collection structure for products
// ----------------------------
db.getCollection("products").drop();
db.createCollection("products");
// ----------------------------
// Documents of products
// ----------------------------
db.getCollection("products").insert([ {
_id: ObjectId("60d5810f5dfbfa1d900b2f50"),
status: NumberInt("2"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f1c410d483f08d2ad8c",
name: "小米手机",
price: NumberInt("2888"),
desc: "为发烧而生",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d581e05dfbfa1d900b2f51"),
status: NumberInt("1"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f1c410d483f08d2ad8c",
name: "华为手机",
price: NumberInt("3888"),
desc: "谁不买,就是不爱国",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d582055dfbfa1d900b2f52"),
status: NumberInt("1"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f1c410d483f08d2ad8c",
name: "oppo手机",
price: NumberInt("2886"),
desc: "性能很好的啊",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d582255dfbfa1d900b2f53"),
status: NumberInt("1"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f28410d483f08d2ad8d",
name: "苹果手机",
price: NumberInt("8888"),
desc: "苹果手机就是香啊",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d582315dfbfa1d900b2f54"),
status: NumberInt("1"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f28410d483f08d2ad8d",
name: "测试1",
price: NumberInt("1"),
desc: "1元手机",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d582375dfbfa1d900b2f55"),
status: NumberInt("2"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f28410d483f08d2ad8d",
name: "测试2",
price: NumberInt("1"),
desc: "2元手机",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d5823d5dfbfa1d900b2f56"),
status: NumberInt("2"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f28410d483f08d2ad8d",
name: "测试3",
price: NumberInt("1"),
desc: "3元手机",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d582435dfbfa1d900b2f57"),
status: NumberInt("1"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f28410d483f08d2ad8d",
name: "测试4",
price: NumberInt("1"),
desc: "4元手机",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d5824c5dfbfa1d900b2f58"),
status: NumberInt("1"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f28410d483f08d2ad8d",
name: "测试5",
price: NumberInt("1"),
desc: "5元手机",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
db.getCollection("products").insert([ {
_id: ObjectId("60d582545dfbfa1d900b2f59"),
status: NumberInt("1"),
imgs: [
"image-1573704320547.jpg"
],
categoryId: "60d43f28410d483f08d2ad8d",
name: "测试6",
price: NumberInt("1"),
desc: "6元手机",
detail: "<p>机身颜色:星河银</p>\n<p>机身长度(mm):160.8</p>\n<p>机身重量(g):196克(含电池) 备注:实际重量依配置、制造工艺、测量方法的不同可能有所差异。</p>\n<p>机身材质工艺:其他</p>\n<p>机身宽度(mm):76.1</p>\n<p>机身材质分类:金属边框;玻璃后盖</p>\n<p>机身厚度(mm):8.4</p>\n<p>运营商标志或内容:无</p>\n",
__v: NumberInt("0")
} ]);
// ----------------------------
// Collection structure for roles
// ----------------------------
db.getCollection("roles").drop();
db.createCollection("roles");
// ----------------------------
// Documents of roles
// ----------------------------
db.getCollection("roles").insert([ {
_id: ObjectId("60dc0e2a82cf3b00549fb0ba"),
menus: [
"products",
"category",
"product"
],
name: "商品管理员",
"create_time": 1625034282420,
__v: NumberInt("0"),
"auth_name": "admin",
"auth_time": 1625034380040
} ]);
db.getCollection("roles").insert([ {
_id: ObjectId("60dc0e7782cf3b00549fb0bb"),
menus: [
"charts",
"bar",
"line",
"pie"
],
name: "图表管理员",
"create_time": 1625034359699,
__v: NumberInt("0"),
"auth_name": "admin",
"auth_time": 1625034372997
} ]);
db.getCollection("roles").insert([ {
_id: ObjectId("60dc0ea482cf3b00549fb0bc"),
menus: [
"home",
"category",
"user",
"bar",
"pie"
],
name: "特殊管理员",
"create_time": 1625034404776,
__v: NumberInt("0"),
"auth_name": "admin",
"auth_time": 1625034418733
} ]);
db.getCollection("roles").insert([ {
_id: ObjectId("60dc10c582cf3b00549fb0bd"),
menus: [
"home"
],
name: "首页管理员",
"create_time": 1625034949872,
__v: NumberInt("0"),
"auth_name": "admin",
"auth_time": 1625034954330
} ]);
// ----------------------------
// Collection structure for users
// ----------------------------
db.getCollection("users").drop();
db.createCollection("users");
// ----------------------------
// Documents of users
// ----------------------------
db.getCollection("users").insert([ {
_id: ObjectId("60d1342029ac623e1cbba92a"),
username: "admin",
password: "21232f297a57a5a743894a0e4a801fc3",
"create_time": 1624323104488,
__v: NumberInt("0")
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("60dc34244d994523200f911e"),
username: "shouye",
password: "e10adc3949ba59abbe56e057f20f883e",
email: "shouye",
phone: "shouye",
"role_id": "60dc10c582cf3b00549fb0bd",
"create_time": 1625044004292,
__v: NumberInt("0")
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("60dc34374d994523200f911f"),
username: "teshu",
password: "e10adc3949ba59abbe56e057f20f883e",
email: "teshu",
phone: "teshu",
"role_id": "60dc0ea482cf3b00549fb0bc",
"create_time": 1625044023748,
__v: NumberInt("0")
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("60dc38984d994523200f9120"),
username: "shangping",
password: "e10adc3949ba59abbe56e057f20f883e",
email: "shangping",
phone: "shangping",
"role_id": "60dc0e2a82cf3b00549fb0ba",
"create_time": 1625045144256,
__v: NumberInt("0")
} ]);