This repository was archived by the owner on Aug 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathlocalhost.sql
More file actions
4205 lines (3630 loc) · 166 KB
/
localhost.sql
File metadata and controls
4205 lines (3630 loc) · 166 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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015 年 09 月 05 日 11:39
-- 服务器版本: 5.6.12-log
-- PHP 版本: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- 数据库: `site`
--
CREATE DATABASE IF NOT EXISTS `site` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `site`;
-- --------------------------------------------------------
--
-- 表的结构 `aws_active_data`
--
CREATE TABLE IF NOT EXISTS `aws_active_data` (
`active_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`expire_time` int(10) DEFAULT NULL,
`active_code` varchar(32) DEFAULT NULL,
`active_type_code` varchar(16) DEFAULT NULL,
`add_time` int(10) DEFAULT NULL,
`add_ip` bigint(12) DEFAULT NULL,
`active_time` int(10) DEFAULT NULL,
`active_ip` bigint(12) DEFAULT NULL,
PRIMARY KEY (`active_id`),
KEY `active_code` (`active_code`),
KEY `active_type_code` (`active_type_code`),
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_answer`
--
CREATE TABLE IF NOT EXISTS `aws_answer` (
`answer_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '回复id',
`question_id` int(11) NOT NULL COMMENT '主题id',
`answer_content` text COMMENT '回复内容',
`add_time` int(10) DEFAULT '0' COMMENT '添加时间',
`against_count` int(11) NOT NULL DEFAULT '0' COMMENT '反对人数',
`agree_count` int(11) NOT NULL DEFAULT '0' COMMENT '支持人数',
`uid` int(11) DEFAULT '0' COMMENT '发布主题用户ID',
`comment_count` int(11) DEFAULT '0' COMMENT '评论总数',
`uninterested_count` int(11) DEFAULT '0' COMMENT '不感兴趣',
`thanks_count` int(11) DEFAULT '0' COMMENT '喜爱数量',
`category_id` int(11) DEFAULT '0' COMMENT '分类id',
`has_attach` tinyint(1) DEFAULT '0' COMMENT '是否存在附件',
`ip` bigint(11) DEFAULT NULL,
`force_fold` tinyint(1) DEFAULT '0' COMMENT '强制折叠',
`anonymous` tinyint(1) DEFAULT '0',
`publish_source` varchar(16) DEFAULT NULL,
PRIMARY KEY (`answer_id`),
KEY `question_id` (`question_id`),
KEY `agree_count` (`agree_count`),
KEY `against_count` (`against_count`),
KEY `add_time` (`add_time`),
KEY `uid` (`uid`),
KEY `uninterested_count` (`uninterested_count`),
KEY `force_fold` (`force_fold`),
KEY `anonymous` (`anonymous`),
KEY `publich_source` (`publish_source`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='回复' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_answer_comments`
--
CREATE TABLE IF NOT EXISTS `aws_answer_comments` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`answer_id` int(11) DEFAULT '0',
`uid` int(11) DEFAULT '0',
`message` text,
`time` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `answer_id` (`answer_id`),
KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_answer_thanks`
--
CREATE TABLE IF NOT EXISTS `aws_answer_thanks` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`answer_id` int(11) DEFAULT '0',
`user_name` varchar(255) DEFAULT NULL,
`time` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `answer_id` (`answer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_answer_uninterested`
--
CREATE TABLE IF NOT EXISTS `aws_answer_uninterested` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`answer_id` int(11) DEFAULT '0',
`user_name` varchar(255) DEFAULT NULL,
`time` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `answer_id` (`answer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_answer_vote`
--
CREATE TABLE IF NOT EXISTS `aws_answer_vote` (
`voter_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自动ID',
`answer_id` int(11) DEFAULT NULL COMMENT '回复id',
`answer_uid` int(11) DEFAULT NULL COMMENT '回复作者id',
`vote_uid` int(11) DEFAULT NULL COMMENT '用户ID',
`add_time` int(10) DEFAULT NULL COMMENT '添加时间',
`vote_value` tinyint(4) NOT NULL COMMENT '-1反对 1 支持',
`reputation_factor` int(10) DEFAULT '0',
PRIMARY KEY (`voter_id`),
KEY `answer_id` (`answer_id`),
KEY `vote_value` (`vote_value`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_approval`
--
CREATE TABLE IF NOT EXISTS `aws_approval` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`type` varchar(16) DEFAULT NULL,
`data` mediumtext NOT NULL,
`uid` int(11) NOT NULL DEFAULT '0',
`time` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `type` (`type`),
KEY `uid` (`uid`),
KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_article`
--
CREATE TABLE IF NOT EXISTS `aws_article` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`uid` int(10) NOT NULL,
`title` varchar(255) NOT NULL,
`message` text,
`comments` int(10) DEFAULT '0',
`views` int(10) DEFAULT '0',
`add_time` int(10) DEFAULT NULL,
`has_attach` tinyint(1) NOT NULL DEFAULT '0',
`lock` int(1) NOT NULL DEFAULT '0',
`votes` int(10) DEFAULT '0',
`title_fulltext` text,
`category_id` int(10) DEFAULT '0',
`is_recommend` tinyint(1) DEFAULT '0',
`chapter_id` int(10) unsigned DEFAULT NULL,
`sort` tinyint(2) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `has_attach` (`has_attach`),
KEY `uid` (`uid`),
KEY `comments` (`comments`),
KEY `views` (`views`),
KEY `add_time` (`add_time`),
KEY `lock` (`lock`),
KEY `votes` (`votes`),
KEY `category_id` (`category_id`),
KEY `is_recommend` (`is_recommend`),
KEY `chapter_id` (`chapter_id`),
KEY `sort` (`sort`),
FULLTEXT KEY `title_fulltext` (`title_fulltext`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_article_comments`
--
CREATE TABLE IF NOT EXISTS `aws_article_comments` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`uid` int(10) NOT NULL,
`article_id` int(10) NOT NULL,
`message` text NOT NULL,
`add_time` int(10) NOT NULL,
`at_uid` int(10) DEFAULT NULL,
`votes` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `article_id` (`article_id`),
KEY `add_time` (`add_time`),
KEY `votes` (`votes`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_article_vote`
--
CREATE TABLE IF NOT EXISTS `aws_article_vote` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`uid` int(10) NOT NULL,
`type` varchar(16) DEFAULT NULL,
`item_id` int(10) NOT NULL,
`rating` tinyint(1) DEFAULT '0',
`time` int(10) NOT NULL,
`reputation_factor` int(10) DEFAULT '0',
`item_uid` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `type` (`type`),
KEY `item_id` (`item_id`),
KEY `time` (`time`),
KEY `item_uid` (`item_uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_attach`
--
CREATE TABLE IF NOT EXISTS `aws_attach` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`file_name` varchar(255) DEFAULT NULL COMMENT '附件名称',
`access_key` varchar(32) DEFAULT NULL COMMENT '批次 Key',
`add_time` int(10) DEFAULT '0' COMMENT '上传时间',
`file_location` varchar(255) DEFAULT NULL COMMENT '文件位置',
`is_image` int(1) DEFAULT '0',
`item_type` varchar(32) DEFAULT '0' COMMENT '关联类型',
`item_id` bigint(20) DEFAULT '0' COMMENT '关联 ID',
`wait_approval` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `access_key` (`access_key`),
KEY `is_image` (`is_image`),
KEY `fetch` (`item_id`,`item_type`),
KEY `wait_approval` (`wait_approval`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_category`
--
CREATE TABLE IF NOT EXISTS `aws_category` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(128) DEFAULT NULL,
`type` varchar(16) DEFAULT NULL,
`icon` varchar(255) DEFAULT NULL,
`parent_id` int(11) DEFAULT '0',
`sort` smallint(6) DEFAULT '0',
`url_token` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `parent_id` (`parent_id`),
KEY `url_token` (`url_token`),
KEY `title` (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- 转存表中的数据 `aws_category`
--
INSERT INTO `aws_category` (`id`, `title`, `type`, `icon`, `parent_id`, `sort`, `url_token`) VALUES
(1, '默认分类', 'question', NULL, 0, 0, NULL);
-- --------------------------------------------------------
--
-- 表的结构 `aws_draft`
--
CREATE TABLE IF NOT EXISTS `aws_draft` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`type` varchar(16) DEFAULT NULL,
`item_id` int(11) DEFAULT NULL,
`data` text,
`time` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `item_id` (`item_id`),
KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_edm_task`
--
CREATE TABLE IF NOT EXISTS `aws_edm_task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`message` mediumtext NOT NULL,
`subject` varchar(255) NOT NULL,
`from_name` varchar(255) NOT NULL,
`time` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_edm_taskdata`
--
CREATE TABLE IF NOT EXISTS `aws_edm_taskdata` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taskid` int(11) NOT NULL,
`email` varchar(255) NOT NULL,
`sent_time` int(10) NOT NULL,
`view_time` int(10) NOT NULL,
PRIMARY KEY (`id`),
KEY `taskid` (`taskid`),
KEY `sent_time` (`sent_time`),
KEY `view_time` (`view_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_edm_unsubscription`
--
CREATE TABLE IF NOT EXISTS `aws_edm_unsubscription` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`time` int(10) NOT NULL,
PRIMARY KEY (`id`),
KEY `email` (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_edm_userdata`
--
CREATE TABLE IF NOT EXISTS `aws_edm_userdata` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`usergroup` int(11) NOT NULL,
`email` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `usergroup` (`usergroup`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_edm_usergroup`
--
CREATE TABLE IF NOT EXISTS `aws_edm_usergroup` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`time` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_education_experience`
--
CREATE TABLE IF NOT EXISTS `aws_education_experience` (
`education_id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT NULL COMMENT '用户UID',
`education_years` int(11) DEFAULT NULL COMMENT '入学年份',
`school_name` varchar(64) DEFAULT NULL COMMENT '学校名',
`school_type` tinyint(4) DEFAULT NULL COMMENT '学校类别',
`departments` varchar(64) DEFAULT NULL COMMENT '院系',
`add_time` int(10) DEFAULT NULL COMMENT '记录添加时间',
PRIMARY KEY (`education_id`),
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='教育经历' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_favorite`
--
CREATE TABLE IF NOT EXISTS `aws_favorite` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`item_id` int(11) DEFAULT '0',
`time` int(10) DEFAULT '0',
`type` varchar(16) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `time` (`time`),
KEY `item_id` (`item_id`),
KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_favorite_tag`
--
CREATE TABLE IF NOT EXISTS `aws_favorite_tag` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`title` varchar(128) DEFAULT NULL,
`item_id` int(11) DEFAULT '0',
`type` varchar(16) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `title` (`title`),
KEY `type` (`type`),
KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_feature`
--
CREATE TABLE IF NOT EXISTS `aws_feature` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(200) DEFAULT NULL COMMENT '专题标题',
`description` varchar(255) DEFAULT NULL COMMENT '专题描述',
`icon` varchar(255) DEFAULT NULL COMMENT '专题图标',
`topic_count` int(11) NOT NULL DEFAULT '0' COMMENT '话题计数',
`css` text COMMENT '自定义CSS',
`url_token` varchar(32) DEFAULT NULL,
`seo_title` varchar(255) DEFAULT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `url_token` (`url_token`),
KEY `title` (`title`),
KEY `enabled` (`enabled`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_feature_topic`
--
CREATE TABLE IF NOT EXISTS `aws_feature_topic` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`feature_id` int(11) NOT NULL DEFAULT '0' COMMENT '专题ID',
`topic_id` int(11) NOT NULL DEFAULT '0' COMMENT '话题ID',
PRIMARY KEY (`id`),
KEY `feature_id` (`feature_id`),
KEY `topic_id` (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_geo_location`
--
CREATE TABLE IF NOT EXISTS `aws_geo_location` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`item_type` varchar(32) NOT NULL,
`item_id` int(10) NOT NULL,
`latitude` float NOT NULL,
`longitude` float NOT NULL,
`add_time` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `item_type` (`item_type`),
KEY `add_time` (`add_time`),
KEY `geo_location` (`latitude`,`longitude`),
KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_help_chapter`
--
CREATE TABLE IF NOT EXISTS `aws_help_chapter` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text,
`url_token` varchar(32) DEFAULT NULL,
`sort` tinyint(2) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `title` (`title`),
KEY `url_token` (`url_token`),
KEY `sort` (`sort`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='帮助中心' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_inbox`
--
CREATE TABLE IF NOT EXISTS `aws_inbox` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT NULL COMMENT '发送者 ID',
`dialog_id` int(11) DEFAULT NULL COMMENT '对话id',
`message` text COMMENT '内容',
`add_time` int(10) DEFAULT NULL COMMENT '添加时间',
`sender_remove` tinyint(1) DEFAULT '0',
`recipient_remove` tinyint(1) DEFAULT '0',
`receipt` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `dialog_id` (`dialog_id`),
KEY `uid` (`uid`),
KEY `add_time` (`add_time`),
KEY `sender_remove` (`sender_remove`),
KEY `recipient_remove` (`recipient_remove`),
KEY `sender_receipt` (`receipt`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_inbox_dialog`
--
CREATE TABLE IF NOT EXISTS `aws_inbox_dialog` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '对话ID',
`sender_uid` int(11) DEFAULT NULL COMMENT '发送者UID',
`sender_unread` int(11) DEFAULT NULL COMMENT '发送者未读',
`recipient_uid` int(11) DEFAULT NULL COMMENT '接收者UID',
`recipient_unread` int(11) DEFAULT NULL COMMENT '接收者未读',
`add_time` int(11) DEFAULT NULL COMMENT '添加时间',
`update_time` int(11) DEFAULT NULL COMMENT '最后更新时间',
`sender_count` int(11) DEFAULT NULL COMMENT '发送者显示对话条数',
`recipient_count` int(11) DEFAULT NULL COMMENT '接收者显示对话条数',
PRIMARY KEY (`id`),
KEY `recipient_uid` (`recipient_uid`),
KEY `sender_uid` (`sender_uid`),
KEY `update_time` (`update_time`),
KEY `add_time` (`add_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_integral_log`
--
CREATE TABLE IF NOT EXISTS `aws_integral_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`action` varchar(16) DEFAULT NULL,
`integral` int(11) DEFAULT NULL,
`note` varchar(128) DEFAULT NULL,
`balance` int(11) DEFAULT '0',
`item_id` int(11) DEFAULT '0',
`time` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `action` (`action`),
KEY `time` (`time`),
KEY `integral` (`integral`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_invitation`
--
CREATE TABLE IF NOT EXISTS `aws_invitation` (
`invitation_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '激活ID',
`uid` int(11) DEFAULT '0' COMMENT '用户ID',
`invitation_code` varchar(32) DEFAULT NULL COMMENT '激活码',
`invitation_email` varchar(255) DEFAULT NULL COMMENT '激活email',
`add_time` int(10) DEFAULT NULL COMMENT '添加时间',
`add_ip` bigint(12) DEFAULT NULL COMMENT '添加IP',
`active_expire` tinyint(1) DEFAULT '0' COMMENT '激活过期',
`active_time` int(10) DEFAULT NULL COMMENT '激活时间',
`active_ip` bigint(12) DEFAULT NULL COMMENT '激活IP',
`active_status` tinyint(4) DEFAULT '0' COMMENT '1已使用0未使用-1已删除',
`active_uid` int(11) DEFAULT NULL,
PRIMARY KEY (`invitation_id`),
KEY `uid` (`uid`),
KEY `invitation_code` (`invitation_code`),
KEY `invitation_email` (`invitation_email`),
KEY `active_time` (`active_time`),
KEY `active_ip` (`active_ip`),
KEY `active_status` (`active_status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_jobs`
--
CREATE TABLE IF NOT EXISTS `aws_jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`job_name` varchar(64) DEFAULT NULL COMMENT '职位名',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=39 ;
--
-- 转存表中的数据 `aws_jobs`
--
INSERT INTO `aws_jobs` (`id`, `job_name`) VALUES
(1, '销售'),
(2, '市场/市场拓展/公关'),
(3, '商务/采购/贸易'),
(4, '计算机软、硬件/互联网/IT'),
(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, '其他');
-- --------------------------------------------------------
--
-- 表的结构 `aws_mail_queue`
--
CREATE TABLE IF NOT EXISTS `aws_mail_queue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`send_to` varchar(255) NOT NULL,
`subject` varchar(255) NOT NULL,
`message` text NOT NULL,
`is_error` tinyint(1) NOT NULL DEFAULT '0',
`error_message` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `is_error` (`is_error`),
KEY `send_to` (`send_to`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_nav_menu`
--
CREATE TABLE IF NOT EXISTS `aws_nav_menu` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(128) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`type` varchar(16) DEFAULT NULL,
`type_id` int(11) DEFAULT '0',
`link` varchar(255) DEFAULT NULL COMMENT '链接',
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
`sort` smallint(6) DEFAULT '0' COMMENT '排序',
PRIMARY KEY (`id`),
KEY `parent_id` (`link`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- 转存表中的数据 `aws_nav_menu`
--
INSERT INTO `aws_nav_menu` (`id`, `title`, `description`, `type`, `type_id`, `link`, `icon`, `sort`) VALUES
(1, '默认分类', '默认分类描述', 'category', 1, NULL, NULL, 0);
-- --------------------------------------------------------
--
-- 表的结构 `aws_notification`
--
CREATE TABLE IF NOT EXISTS `aws_notification` (
`notification_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`sender_uid` int(11) DEFAULT NULL COMMENT '发送者ID',
`recipient_uid` int(11) DEFAULT '0' COMMENT '接收者ID',
`action_type` int(4) DEFAULT NULL COMMENT '操作类型',
`model_type` smallint(11) NOT NULL DEFAULT '0',
`source_id` varchar(16) NOT NULL DEFAULT '0' COMMENT '关联 ID',
`add_time` int(10) DEFAULT NULL COMMENT '添加时间',
`read_flag` tinyint(1) DEFAULT '0' COMMENT '阅读状态',
PRIMARY KEY (`notification_id`),
KEY `recipient_read_flag` (`recipient_uid`,`read_flag`),
KEY `sender_uid` (`sender_uid`),
KEY `model_type` (`model_type`),
KEY `source_id` (`source_id`),
KEY `action_type` (`action_type`),
KEY `add_time` (`add_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='系统通知' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_notification_data`
--
CREATE TABLE IF NOT EXISTS `aws_notification_data` (
`notification_id` int(11) unsigned NOT NULL,
`data` text,
PRIMARY KEY (`notification_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='系统通知数据表';
-- --------------------------------------------------------
--
-- 表的结构 `aws_pages`
--
CREATE TABLE IF NOT EXISTS `aws_pages` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`url_token` varchar(32) NOT NULL,
`title` varchar(255) DEFAULT NULL,
`keywords` varchar(255) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`contents` text,
`enabled` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `url_token` (`url_token`),
KEY `enabled` (`enabled`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_posts_index`
--
CREATE TABLE IF NOT EXISTS `aws_posts_index` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`post_id` int(10) NOT NULL,
`post_type` varchar(16) NOT NULL DEFAULT '',
`add_time` int(10) NOT NULL,
`update_time` int(10) DEFAULT '0',
`category_id` int(10) DEFAULT '0',
`is_recommend` tinyint(1) DEFAULT '0',
`view_count` int(10) DEFAULT '0',
`anonymous` tinyint(1) DEFAULT '0',
`popular_value` int(10) DEFAULT '0',
`uid` int(10) NOT NULL,
`lock` tinyint(1) DEFAULT '0',
`agree_count` int(10) DEFAULT '0',
`answer_count` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `post_id` (`post_id`),
KEY `post_type` (`post_type`),
KEY `add_time` (`add_time`),
KEY `update_time` (`update_time`),
KEY `category_id` (`category_id`),
KEY `is_recommend` (`is_recommend`),
KEY `anonymous` (`anonymous`),
KEY `popular_value` (`popular_value`),
KEY `uid` (`uid`),
KEY `lock` (`lock`),
KEY `agree_count` (`agree_count`),
KEY `answer_count` (`answer_count`),
KEY `view_count` (`view_count`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_question`
--
CREATE TABLE IF NOT EXISTS `aws_question` (
`question_id` int(11) NOT NULL AUTO_INCREMENT,
`question_content` varchar(255) NOT NULL DEFAULT '' COMMENT '主题内容',
`question_detail` text COMMENT '主题说明',
`add_time` int(11) NOT NULL COMMENT '添加时间',
`update_time` int(11) DEFAULT NULL,
`published_uid` int(11) DEFAULT NULL COMMENT '发布用户UID',
`answer_count` int(11) NOT NULL DEFAULT '0' COMMENT '回复计数',
`answer_users` int(11) NOT NULL DEFAULT '0' COMMENT '回复人数',
`view_count` int(11) NOT NULL DEFAULT '0' COMMENT '浏览次数',
`focus_count` int(11) NOT NULL DEFAULT '0' COMMENT '关注数',
`comment_count` int(11) NOT NULL DEFAULT '0' COMMENT '评论数',
`action_history_id` int(11) NOT NULL DEFAULT '0' COMMENT '动作的记录表的关连id',
`category_id` int(11) NOT NULL DEFAULT '0' COMMENT '分类 ID',
`agree_count` int(11) NOT NULL DEFAULT '0' COMMENT '回复赞同数总和',
`against_count` int(11) NOT NULL DEFAULT '0' COMMENT '回复反对数总和',
`best_answer` int(11) NOT NULL DEFAULT '0' COMMENT '最佳回复 ID',
`has_attach` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否存在附件',
`unverified_modify` text,
`unverified_modify_count` int(10) NOT NULL DEFAULT '0',
`ip` bigint(11) DEFAULT NULL,
`last_answer` int(11) NOT NULL DEFAULT '0' COMMENT '最后回复 ID',
`popular_value` double NOT NULL DEFAULT '0',
`popular_value_update` int(10) NOT NULL DEFAULT '0',
`lock` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否锁定',
`anonymous` tinyint(1) NOT NULL DEFAULT '0',
`thanks_count` int(10) NOT NULL DEFAULT '0',
`question_content_fulltext` text,
`is_recommend` tinyint(1) NOT NULL DEFAULT '0',
`weibo_msg_id` bigint(20) DEFAULT NULL,
`received_email_id` int(10) DEFAULT NULL,
`chapter_id` int(10) unsigned DEFAULT NULL,
`sort` tinyint(2) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`question_id`),
KEY `category_id` (`category_id`),
KEY `update_time` (`update_time`),
KEY `add_time` (`add_time`),
KEY `published_uid` (`published_uid`),
KEY `answer_count` (`answer_count`),
KEY `agree_count` (`agree_count`),
KEY `question_content` (`question_content`),
KEY `lock` (`lock`),
KEY `thanks_count` (`thanks_count`),
KEY `anonymous` (`anonymous`),
KEY `popular_value` (`popular_value`),
KEY `best_answer` (`best_answer`),
KEY `popular_value_update` (`popular_value_update`),
KEY `against_count` (`against_count`),
KEY `is_recommend` (`is_recommend`),
KEY `weibo_msg_id` (`weibo_msg_id`),
KEY `received_email_id` (`received_email_id`),
KEY `unverified_modify_count` (`unverified_modify_count`),
KEY `chapter_id` (`chapter_id`),
KEY `sort` (`sort`),
FULLTEXT KEY `question_content_fulltext` (`question_content_fulltext`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='主题列表' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_question_comments`
--
CREATE TABLE IF NOT EXISTS `aws_question_comments` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`question_id` int(11) DEFAULT '0',
`uid` int(11) DEFAULT '0',
`message` text,
`time` int(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `question_id` (`question_id`),
KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_question_focus`
--
CREATE TABLE IF NOT EXISTS `aws_question_focus` (
`focus_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`question_id` int(11) DEFAULT NULL COMMENT '话题ID',
`uid` int(11) DEFAULT NULL COMMENT '用户UID',
`add_time` int(10) DEFAULT NULL,
PRIMARY KEY (`focus_id`),
KEY `question_id` (`question_id`),
KEY `question_uid` (`question_id`,`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='主题关注表' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_question_invite`
--
CREATE TABLE IF NOT EXISTS `aws_question_invite` (
`question_invite_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`question_id` int(11) NOT NULL COMMENT '主题ID',
`sender_uid` int(11) NOT NULL,
`recipients_uid` int(11) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL COMMENT '受邀Email',
`add_time` int(10) DEFAULT '0' COMMENT '添加时间',
`available_time` int(10) DEFAULT '0' COMMENT '生效时间',
PRIMARY KEY (`question_invite_id`),
KEY `question_id` (`question_id`),
KEY `sender_uid` (`sender_uid`),
KEY `recipients_uid` (`recipients_uid`),
KEY `add_time` (`add_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='邀请问答' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_question_thanks`
--
CREATE TABLE IF NOT EXISTS `aws_question_thanks` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`question_id` int(11) DEFAULT '0',
`user_name` varchar(255) DEFAULT NULL,
`time` int(10) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `question_id` (`question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_question_uninterested`
--
CREATE TABLE IF NOT EXISTS `aws_question_uninterested` (
`interested_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`question_id` int(11) DEFAULT NULL COMMENT '话题ID',
`uid` int(11) DEFAULT NULL COMMENT '用户UID',
`add_time` int(10) DEFAULT NULL,
PRIMARY KEY (`interested_id`),
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='主题不感兴趣表' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_received_email`
--
CREATE TABLE IF NOT EXISTS `aws_received_email` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`uid` int(10) NOT NULL,
`config_id` int(10) NOT NULL,
`message_id` varchar(255) NOT NULL,
`date` int(10) NOT NULL,
`from` varchar(255) NOT NULL,
`subject` varchar(255) DEFAULT NULL,
`content` text,
`question_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `config_id` (`config_id`),
KEY `message_id` (`message_id`),
KEY `date` (`date`),
KEY `question_id` (`question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='已导入邮件列表' AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `aws_receiving_email_config`
--
CREATE TABLE IF NOT EXISTS `aws_receiving_email_config` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`protocol` varchar(10) NOT NULL,
`server` varchar(255) NOT NULL,
`ssl` tinyint(1) NOT NULL DEFAULT '0',
`port` smallint(5) DEFAULT NULL,
`username` varchar(255) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`uid` int(10) NOT NULL,
`access_key` varchar(32) NOT NULL,
`has_attach` tinyint(1) NOT NULL DEFAULT '0',