/*
Navicat MySQL Data Transfer
Date: 2018-06-21 12:39:06
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for ask_answers
-- ----------------------------
DROP TABLE IF EXISTS `ask_answers`;
CREATE TABLE `ask_answers` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`question_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '问题',
`question_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '问题id',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '回答发起人UID',
`content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '回答内容',
`supports` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '支持数',
`oppositions` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '反对数',
`comments` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评论数',
`device` tinyint(4) NOT NULL DEFAULT '1' COMMENT '提问设备类型1pc,2安卓,3IOS,4weixin',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '回答状态0待审核,1已审核',
`adopted_at` timestamp NULL DEFAULT NULL COMMENT '回答采纳时间',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `answers_created_at_index` (`created_at`),
KEY `answers_updated_at_index` (`updated_at`),
KEY `answers_question_id_index` (`question_id`),
KEY `answers_user_id_index` (`user_id`),
KEY `answers_adopted_at_index` (`adopted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '回答表';
-- ----------------------------
-- Records of ask_answers
-- ----------------------------
-- ----------------------------
-- Table structure for ask_areas
-- ----------------------------
DROP TABLE IF EXISTS `ask_areas`;
CREATE TABLE `ask_areas` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '地区名称',
`parent_id` smallint(6) NOT NULL DEFAULT '0' COMMENT '上级id',
`grade` tinyint(4) NOT NULL COMMENT '层级',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=386 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '区域表';
-- ----------------------------
-- Records of ask_areas
-- ----------------------------
INSERT INTO `ask_areas` VALUES ('1', '北京', '0', '1');
INSERT INTO `ask_areas` VALUES ('2', '上海', '0', '1');
INSERT INTO `ask_areas` VALUES ('3', '天津', '0', '1');
INSERT INTO `ask_areas` VALUES ('4', '重庆', '0', '1');
INSERT INTO `ask_areas` VALUES ('5', '辽宁', '0', '1');
INSERT INTO `ask_areas` VALUES ('6', '吉林', '0', '1');
INSERT INTO `ask_areas` VALUES ('7', '黑龙江', '0', '1');
INSERT INTO `ask_areas` VALUES ('8', '河北', '0', '1');
INSERT INTO `ask_areas` VALUES ('9', '山西', '0', '1');
INSERT INTO `ask_areas` VALUES ('10', '山东', '0', '1');
INSERT INTO `ask_areas` VALUES ('11', '河南', '0', '1');
INSERT INTO `ask_areas` VALUES ('12', '内蒙古', '0', '1');
INSERT INTO `ask_areas` VALUES ('13', '陕西', '0', '1');
INSERT INTO `ask_areas` VALUES ('14', '甘肃', '0', '1');
INSERT INTO `ask_areas` VALUES ('15', '宁夏', '0', '1');
INSERT INTO `ask_areas` VALUES ('16', '青海', '0', '1');
INSERT INTO `ask_areas` VALUES ('17', '新疆', '0', '1');
INSERT INTO `ask_areas` VALUES ('18', '福建', '0', '1');
INSERT INTO `ask_areas` VALUES ('19', '湖南', '0', '1');
INSERT INTO `ask_areas` VALUES ('20', '广东', '0', '1');
INSERT INTO `ask_areas` VALUES ('21', '广西', '0', '1');
INSERT INTO `ask_areas` VALUES ('22', '海南', '0', '1');
INSERT INTO `ask_areas` VALUES ('23', '江苏', '0', '1');
INSERT INTO `ask_areas` VALUES ('24', '浙江', '0', '1');
INSERT INTO `ask_areas` VALUES ('25', '安徽', '0', '1');
INSERT INTO `ask_areas` VALUES ('26', '江西', '0', '1');
INSERT INTO `ask_areas` VALUES ('27', '湖北', '0', '1');
INSERT INTO `ask_areas` VALUES ('28', '四川', '0', '1');
INSERT INTO `ask_areas` VALUES ('29', '贵州', '0', '1');
INSERT INTO `ask_areas` VALUES ('30', '云南', '0', '1');
INSERT INTO `ask_areas` VALUES ('31', '西藏', '0', '1');
INSERT INTO `ask_areas` VALUES ('32', '北京市', '1', '2');
INSERT INTO `ask_areas` VALUES ('33', '上海市', '2', '2');
INSERT INTO `ask_areas` VALUES ('34', '天津市', '3', '2');
INSERT INTO `ask_areas` VALUES ('35', '重庆市', '4', '2');
INSERT INTO `ask_areas` VALUES ('36', '抚顺', '5', '2');
INSERT INTO `ask_areas` VALUES ('37', '本溪', '5', '2');
INSERT INTO `ask_areas` VALUES ('38', '丹东', '5', '2');
INSERT INTO `ask_areas` VALUES ('39', '锦州', '5', '2');
INSERT INTO `ask_areas` VALUES ('40', '营口', '5', '2');
INSERT INTO `ask_areas` VALUES ('41', '阜新', '5', '2');
INSERT INTO `ask_areas` VALUES ('42', '辽阳', '5', '2');
INSERT INTO `ask_areas` VALUES ('43', '铁岭', '5', '2');
INSERT INTO `ask_areas` VALUES ('44', '朝阳', '5', '2');
INSERT INTO `ask_areas` VALUES ('45', '盘锦', '5', '2');
INSERT INTO `ask_areas` VALUES ('46', '葫芦岛', '5', '2');
INSERT INTO `ask_areas` VALUES ('47', '大连', '5', '2');
INSERT INTO `ask_areas` VALUES ('48', '沈阳', '5', '2');
INSERT INTO `ask_areas` VALUES ('49', '鞍山', '5', '2');
INSERT INTO `ask_areas` VALUES ('50', '长春', '6', '2');
INSERT INTO `ask_areas` VALUES ('51', '吉林', '6', '2');
INSERT INTO `ask_areas` VALUES ('52', '四平', '6', '2');
INSERT INTO `ask_areas` VALUES ('53', '辽源', '6', '2');
INSERT INTO `ask_areas` VALUES ('54', '通化', '6', '2');
INSERT INTO `ask_areas` VALUES ('55', '白城', '6', '2');
INSERT INTO `ask_areas` VALUES ('56', '延边', '6', '2');
INSERT INTO `ask_areas` VALUES ('57', '白山', '6', '2');
INSERT INTO `ask_areas` VALUES ('58', '松原', '6', '2');
INSERT INTO `ask_areas` VALUES ('59', '哈尔滨', '7', '2');
INSERT INTO `ask_areas` VALUES ('60', '齐齐哈尔', '7', '2');
INSERT INTO `ask_areas` VALUES ('61', '鹤岗', '7', '2');
INSERT INTO `ask_areas` VALUES ('62', '双鸭山', '7', '2');
INSERT INTO `ask_areas` VALUES ('63', '鸡西', '7', '2');
INSERT INTO `ask_areas` VALUES ('64', '大庆', '7', '2');
INSERT INTO `ask_areas` VALUES ('65', '伊春', '7', '2');
INSERT INTO `ask_areas` VALUES ('66', '牡丹江', '7', '2');
INSERT INTO `ask_areas` VALUES ('67', '佳木斯', '7', '2');
INSERT INTO `ask_areas` VALUES ('68', '七台河', '7', '2');
INSERT INTO `ask_areas` VALUES ('69', '绥化', '7', '2');
INSERT INTO `ask_areas` VALUES ('70', '黑河', '7', '2');
INSERT INTO `ask_areas` VALUES ('71', '大兴安岭', '7', '2');
INSERT INTO `ask_areas` VALUES ('72', '石家庄', '8', '2');
INSERT INTO `ask_areas` VALUES ('73', '唐山', '8', '2');
INSERT INTO `ask_areas` VALUES ('74', '秦皇岛', '8', '2');
INSERT INTO `ask_areas` VALUES ('75', '邯郸', '8', '2');
INSERT INTO `ask_areas` VALUES ('76', '邢台', '8', '2');
INSERT INTO `ask_areas` VALUES ('77', '张家口', '8', '2');
INSERT INTO `ask_areas` VALUES ('78', '承德', '8', '2');
INSERT INTO `ask_areas` VALUES ('79', '廊坊', '8', '2');
INSERT INTO `ask_areas` VALUES ('80', '沧州', '8', '2');
INSERT INTO `ask_areas` VALUES ('81', '保定', '8', '2');
INSERT INTO `ask_areas` VALUES ('82', '衡水', '8', '2');
INSERT INTO `ask_areas` VALUES ('83', '太原', '9', '2');
INSERT INTO `ask_areas` VALUES ('84', '大同', '9', '2');
INSERT INTO `ask_areas` VALUES ('85', '阳泉', '9', '2');
INSERT INTO `ask_areas` VALUES ('86', '长治', '9', '2');
INSERT INTO `ask_areas` VALUES ('87', '晋城', '9', '2');
INSERT INTO `ask_areas` VALUES ('88', '朔州', '9', '2');
INSERT INTO `ask_areas` VALUES ('89', '晋中', '9', '2');
INSERT INTO `ask_areas` VALUES ('90', '忻州', '9', '2');
INSERT INTO `ask_areas` VALUES ('91', '吕梁', '9', '2');
INSERT INTO `ask_areas` VALUES ('92', '临汾', '9', '2');
INSERT INTO `ask_areas` VALUES ('93', '运城', '9', '2');
INSERT INTO `ask_areas` VALUES ('94', '济南', '10', '2');
INSERT INTO `ask_areas` VALUES ('95', '青岛', '10', '2');
INSERT INTO `ask_areas` VALUES ('96', '淄博', '10', '2');
INSERT INTO `ask_areas` VALUES ('97', '枣庄', '10', '2');
INSERT INTO `ask_areas` VALUES ('98', '东营', '10', '2');
INSERT INTO `ask_areas` VALUES ('99', '潍坊', '10', '2');
INSERT INTO `ask_areas` VALUES ('100', '烟台', '10', '2');
INSERT INTO `ask_areas` VALUES ('101', '威海', '10', '2');
INSERT INTO `ask_areas` VALUES ('102', '济宁', '10', '2');
INSERT INTO `ask_areas` VALUES ('103', '泰安', '10', '2');
INSERT INTO `ask_areas` VALUES ('104', '日照', '10', '2');
INSERT INTO `ask_areas` VALUES ('105', '莱芜', '10', '2');
INSERT INTO `ask_areas` VALUES ('106', '德州', '10', '2');
INSERT INTO `ask_areas` VALUES ('107', '滨州', '10', '2');
INSERT INTO `ask_areas` VALUES ('108', '临沂', '10', '2');
INSERT INTO `ask_areas` VALUES ('109', '荷泽', '10', '2');
INSERT INTO `ask_areas` VALUES ('110', '聊城', '10', '2');
INSERT INTO `ask_areas` VALUES ('111', '郑州', '11', '2');
INSERT INTO `ask_areas` VALUES ('112', '开封', '11', '2');
INSERT INTO `ask_areas` VALUES ('113', '洛阳', '11', '2');
INSERT INTO `ask_areas` VALUES ('114', '平顶山', '11', '2');
INSERT INTO `ask_areas` VALUES ('115', '焦作', '11', '2');
INSERT INTO `ask_areas` VALUES ('116', '鹤壁', '11', '2');
INSERT INTO `ask_areas` VALUES ('117', '新乡', '11', '2');
INSERT INTO `ask_areas` VALUES ('118', '安阳', '11', '2');
INSERT INTO `ask_areas` VALUES ('119', '濮阳', '11', '2');
INSERT INTO `ask_areas` VALUES ('120', '许昌', '11', '2');
INSERT INTO `ask_areas` VALUES ('121', '漯河', '11', '2');
INSERT INTO `ask_areas` VALUES ('122', '三门峡', '11', '2');
INSERT INTO `ask_areas` VALUES ('123', '商丘', '11', '2');
INSERT INTO `ask_areas` VALUES ('124', '周口', '11', '2');
INSERT INTO `ask_areas` VALUES ('125', '驻马店', '11', '2');
INSERT INTO `ask_areas` VALUES ('126', '信阳', '11', '2');
INSERT INTO `ask_areas` VALUES ('127', '南阳', '11', '2');
INSERT INTO `ask_areas` VALUES ('128', '济源', '11', '2');
INSERT INTO `ask_areas` VALUES ('129', '呼和浩特', '12', '2');
INSERT INTO `ask_areas` VALUES ('130', '包头', '12', '2');
INSERT INTO `ask_areas` VALUES ('131', '乌海', '12', '2');
INSERT INTO `ask_areas` VALUES ('132', '赤峰', '12', '2');
INSERT INTO `ask_areas` VALUES ('133', '呼伦贝尔', '12', '2');
INSERT INTO `ask_areas` VALUES ('134', '巴彦淖尔', '12', '2');
INSERT INTO `ask_areas` VALUES ('135', '通辽', '12', '2');
INSERT INTO `ask_areas` VALUES ('136', '鄂尔多斯', '12', '2');
INSERT INTO `ask_areas` VALUES ('137', '乌兰察布', '12', '2');
INSERT INTO `ask_areas` VALUES ('138', '锡林郭勒盟', '12', '2');
INSERT INTO `ask_areas` VALUES ('139', '阿拉善盟', '12', '2');
INSERT INTO `ask_areas` VALUES ('140', '兴安盟', '12', '2');
INSERT INTO `ask_areas` VALUES ('141', '西安', '13', '2');
INSERT INTO `ask_areas` VALUES ('142', '铜川', '13', '2');
INSERT INTO `ask_areas` VALUES ('143', '宝鸡', '13', '2');
INSERT INTO `ask_areas` VALUES ('144', '咸阳', '13', '2');
INSERT INTO `ask_areas` VALUES ('145', '榆林', '13', '2');
INSERT INTO `ask_areas` VALUES ('146', '延安', '13', '2');
INSERT INTO `ask_areas` VALUES ('147', '渭南', '13', '2');
INSERT INTO `ask_areas` VALUES ('148', '汉中', '13', '2');
INSERT INTO `ask_areas` VALUES ('149', '商洛', '13', '2');
INSERT INTO `ask_areas` VALUES ('150', '安康', '13', '2');
INSERT INTO `ask_areas` VALUES ('151', '杨凌示范区', '13', '2');
INSERT INTO `ask_areas` VALUES ('152', '兰州', '14', '2');
INSERT INTO `ask_areas` VALUES ('153', '金昌', '14', '2');
INSERT INTO `ask_areas` VALUES ('154', '白银', '14', '2');
INSERT INTO `ask_areas` VALUES ('155', '天水', '14', '2');
INSERT INTO `ask_areas` VALUES ('156', '临夏回族自治州', '14', '2');
INSERT INTO `ask_areas` VALUES ('157', '定西', '14', '2');
INSERT INTO `ask_areas` VALUES ('158', '平凉', '14', '2');
INSERT INTO `ask_areas` VALUES ('159', '庆阳', '14', '2');
INSERT INTO `ask_areas` VALUES ('160', '陇南', '14', '2');
INSERT INTO `ask_areas` VALUES ('161', '武威', '14', '2');
INSERT INTO `ask_areas` VALUES ('162', '张掖', '14', '2');
INSERT INTO `ask_areas` VALUES ('163', '酒泉', '14', '2');
INSERT INTO `ask_areas` VALUES ('164', '甘南藏族自治州', '14', '2');
INSERT INTO `ask_areas` VALUES ('165', '嘉峪关', '14', '2');
INSERT INTO `ask_areas` VALUES ('166', '银川', '15', '2');
INSERT INTO `ask_areas` VALUES ('167', '石嘴山', '15', '2');
INSERT INTO `ask_areas` VALUES ('168', '吴忠', '15', '2');
INSERT INTO `ask_areas` VALUES ('169', '固原', '15', '2');
INSERT INTO `ask_areas` VALUES ('170', '中卫', '15', '2');
INSERT INTO `ask_areas` VALUES ('171', '西宁', '16', '2');
INSERT INTO `ask_areas` VALUES ('172', '海东地区', '16', '2');
INSERT INTO `ask_areas` VALUES ('173', '海北藏族自治州', '16', '2');
INSERT INTO `ask_areas` VALUES ('174', '黄南藏族自治州', '16', '2');
INSERT INTO `ask_areas` VALUES ('175', '海南藏族自治州', '16', '2');
INSERT INTO `ask_areas` VALUES ('176', '果洛藏族自治州', '16', '2');
INSERT INTO `ask_areas` VALUES ('177', '玉树藏族自治州', '16', '2');
INSERT INTO `ask_areas` VALUES ('178', '海西蒙古族藏族自治州', '16', '2');
INSERT INTO `ask_areas` VALUES ('179', '乌鲁木齐', '17', '2');
INSERT INTO `ask_areas` VALUES ('180', '克拉玛依', '17', '2');
INSERT INTO `ask_areas` VALUES ('181', '石河子', '17', '2');
INSERT INTO `ask_areas` VALUES ('182', '吐鲁番地区', '17', '2');
INSERT INTO `ask_areas` VALUES ('183', '哈密地区', '17', '2');
INSERT INTO `ask_areas` VALUES ('184', '昌吉回族自治州', '17', '2');
INSERT INTO `ask_areas` VALUES ('185', '和田地区', '17', '2');
INSERT INTO `ask_areas` VALUES ('186', '阿克苏地区', '17', '2');
INSERT INTO `ask_areas` VALUES ('187', '喀什地区', '17', '2');
INSERT INTO `ask_areas` VALUES ('188', '克孜勒苏柯尔克孜自治州', '17', '2');
INSERT INTO `ask_areas` VALUES ('189', '巴音郭楞蒙古自治州', '17', '2');
INSERT INTO `ask_areas` VALUES ('190', '塔城地区', '17', '2');
INSERT INTO `ask_areas` VALUES ('191', '阿勒泰地区', '17', '2');
INSERT INTO `ask_areas` VALUES ('192', '博尔塔拉蒙古自治州', '17', '2');
INSERT INTO `ask_areas` VALUES ('193', '伊犁哈萨克自治州', '17', '2');
INSERT INTO `ask_areas` VALUES ('194', '阿拉尔', '17', '2');
INSERT INTO `ask_areas` VALUES ('195', '图木舒克', '17', '2');
INSERT INTO `ask_areas` VALUES ('196', '五家渠', '17', '2');
INSERT INTO `ask_areas` VALUES ('197', '福州', '18', '2');
INSERT INTO `ask_areas` VALUES ('198', '厦门', '18', '2');
INSERT INTO `ask_areas` VALUES ('199', '三明', '18', '2');
INSERT INTO `ask_areas` VALUES ('200', '莆田', '18', '2');
INSERT INTO `ask_areas` VALUES ('201', '泉州', '18', '2');
INSERT INTO `ask_areas` VALUES ('202', '漳州', '18', '2');
INSERT INTO `ask_areas` VALUES ('203', '南平', '18', '2');
INSERT INTO `ask_areas` VALUES ('204', '宁德', '18', '2');
INSERT INTO `ask_areas` VALUES ('205', '龙岩', '18', '2');
INSERT INTO `ask_areas` VALUES ('206', '长沙', '19', '2');
INSERT INTO `ask_areas` VALUES ('207', '株洲', '19', '2');
INSERT INTO `ask_areas` VALUES ('208', '湘潭', '19', '2');
INSERT INTO `ask_areas` VALUES ('209', '衡阳', '19', '2');
INSERT INTO `ask_areas` VALUES ('210', '邵阳', '19', '2');
INSERT INTO `ask_areas` VALUES ('211', '岳阳', '19', '2');
INSERT INTO `ask_areas` VALUES ('212', '常德', '19', '2');
INSERT INTO `ask_areas` VALUES ('213', '张家界', '19', '2');
INSERT INTO `ask_areas` VALUES ('214', '娄底', '19', '2');
INSERT INTO `ask_areas` VALUES ('215', '郴州', '19', '2');
INSERT INTO `ask_areas` VALUES ('216', '永州', '19', '2');
INSERT INTO `ask_areas` VALUES ('217', '怀化', '19', '2');
INSERT INTO `ask_areas` VALUES ('218', '益阳', '19', '2');
INSERT INTO `ask_areas` VALUES ('219', '湘西自治州', '19', '2');
INSERT INTO `ask_areas` VALUES ('220', '广州', '20', '2');
INSERT INTO `ask_areas` VALUES ('221', '深圳', '20', '2');
INSERT INTO `ask_areas` VALUES ('222', '珠海', '20', '2');
INSERT INTO `ask_areas` VALUES ('223', '佛山', '20', '2');
INSERT INTO `ask_areas` VALUES ('224', '东莞', '20', '2');
INSERT INTO `ask_areas` VALUES ('225', '惠州', '20', '2');
INSERT INTO `ask_areas` VALUES ('226', '江门', '20', '2');
INSERT INTO `ask_areas` VALUES ('227', '湛江', '20', '2');
INSERT INTO `ask_areas` VALUES ('228', '茂名', '20', '2');
INSERT INTO `ask_areas` VALUES ('229', '中山', '20', '2');
INSERT INTO `ask_areas` VALUES ('230', '汕头', '20', '2');
INSERT INTO `ask_areas` VALUES ('231', '揭阳', '20', '2');
INSERT INTO `ask_areas` VALUES ('232', '潮州', '20', '2');
INSERT INTO `ask_areas` VALUES ('233', '汕尾', '20', '2');
INSERT INTO `ask_areas` VALUES ('234', '韶关', '20', '2');
INSERT INTO `ask_areas` VALUES ('235', '肇庆', '20', '2');
INSERT INTO `ask_areas` VALUES ('236', '清远', '20', '2');
INSERT INTO `ask_areas` VALUES ('237', '梅州', '20', '2');
INSERT INTO `ask_areas` VALUES ('238', '河源', '20', '2');
INSERT INTO `ask_areas` VALUES ('239', '云浮', '20', '2');
INSERT INTO `ask_areas` VALUES ('240', '阳江', '20', '2');
INSERT INTO `ask_areas` VALUES ('241', '南宁', '21', '2');
INSERT INTO `ask_areas` VALUES ('242', '柳州', '21', '2');
INSERT INTO `ask_areas` VALUES ('243', '桂林', '21', '2');
INSERT INTO `ask_areas` VALUES ('244', '梧州', '21', '2');
INSERT INTO `ask_areas` VALUES ('245', '北海', '21', '2');
INSERT INTO `ask_areas` VALUES ('246', '玉林', '21', '2');
INSERT INTO `ask_areas` VALUES ('247', '百色', '21', '2');
INSERT INTO `ask_areas` VALUES ('248', '防城港', '21', '2');
INSERT INTO `ask_areas` VALUES ('249', '钦州', '21', '2');
INSERT INTO `ask_areas` VALUES ('250', '贵港', '21', '2');
INSERT INTO `ask_areas` VALUES ('251', '贺州', '21', '2');
INSERT INTO `ask_areas` VALUES ('252', '河池', '21', '2');
INSERT INTO `ask_areas` VALUES ('253', '来宾', '21', '2');
INSERT INTO `ask_areas` VALUES ('254', '崇左', '21', '2');
INSERT INTO `ask_areas` VALUES ('255', '海口', '22', '2');
INSERT INTO `ask_areas` VALUES ('256', '三亚', '22', '2');
INSERT INTO `ask_areas` VALUES ('257', '琼海', '22', '2');
INSERT INTO `ask_areas` VALUES ('258', '五指山', '22', '2');
INSERT INTO `ask_areas` VALUES ('259', '儋州', '22', '2');
INSERT INTO `ask_areas` VALUES ('260', '文昌', '22', '2');
INSERT INTO `ask_areas` VALUES ('261', '万宁', '22', '2');
INSERT INTO `ask_areas` VALUES ('262', '东方', '22', '2');
INSERT INTO `ask_areas` VALUES ('263', '其他', '22', '2');
INSERT INTO `ask_areas` VALUES ('264', '南京', '23', '2');
INSERT INTO `ask_areas` VALUES ('265', '徐州', '23', '2');
INSERT INTO `ask_areas` VALUES ('266', '连云港', '23', '2');
INSERT INTO `ask_areas` VALUES ('267', '淮安', '23', '2');
INSERT INTO `ask_areas` VALUES ('268', '盐城', '23', '2');
INSERT INTO `ask_areas` VALUES ('269', '扬州', '23', '2');
INSERT INTO `ask_areas` VALUES ('270', '南通', '23', '2');
INSERT INTO `ask_areas` VALUES ('271', '镇江', '23', '2');
INSERT INTO `ask_areas` VALUES ('272', '常州', '23', '2');
INSERT INTO `ask_areas` VALUES ('273', '泰州', '23', '2');
INSERT INTO `ask_areas` VALUES ('274', '无锡', '23', '2');
INSERT INTO `ask_areas` VALUES ('275', '苏州', '23', '2');
INSERT INTO `ask_areas` VALUES ('276', '宿迁', '23', '2');
INSERT INTO `ask_areas` VALUES ('277', '杭州', '24', '2');
INSERT INTO `ask_areas` VALUES ('278', '湖州', '24', '2');
INSERT INTO `ask_areas` VALUES ('279', '宁波', '24', '2');
INSERT INTO `ask_areas` VALUES ('280', '温州', '24', '2');
INSERT INTO `ask_areas` VALUES ('281', '嘉兴', '24', '2');
INSERT INTO `ask_areas` VALUES ('282', '绍兴', '24', '2');
INSERT INTO `ask_areas` VALUES ('283', '金华', '24', '2');
INSERT INTO `ask_areas` VALUES ('284', '衢州', '24', '2');
INSERT INTO `ask_areas` VALUES ('285', '舟山', '24', '2');
INSERT INTO `ask_areas` VALUES ('286', '台州', '24', '2');
INSERT INTO `ask_areas` VALUES ('287', '丽水', '24', '2');
INSERT INTO `ask_areas` VALUES ('288', '合肥', '25', '2');
INSERT INTO `ask_areas` VALUES ('289', '淮南', '25', '2');
INSERT INTO `ask_areas` VALUES ('290', '淮北', '25', '2');
INSERT INTO `ask_areas` VALUES ('291', '芜湖', '25', '2');
INSERT INTO `ask_areas` VALUES ('292', '铜陵', '25', '2');
INSERT INTO `ask_areas` VALUES ('293', '蚌埠', '25', '2');
INSERT INTO `ask_areas` VALUES ('294', '马鞍山', '25', '2');
INSERT INTO `ask_areas` VALUES ('295', '安庆', '25', '2');
INSERT INTO `ask_areas` VALUES ('296', '黄山', '25', '2');
INSERT INTO `ask_areas` VALUES ('297', '宿州', '25', '2');
INSERT INTO `ask_areas` VALUES ('298', '滁州', '25', '2');
INSERT INTO `ask_areas` VALUES ('299', '巢湖', '25', '2');
INSERT INTO `ask_areas` VALUES ('300', '宣城', '25', '2');
INSERT INTO `ask_areas` VALUES ('301', '池州', '25', '2');
INSERT INTO `ask_areas` VALUES ('302', '六安', '25', '2');
INSERT INTO `ask_areas` VALUES ('303', '阜阳', '25', '2');
INSERT INTO `ask_areas` VALUES ('304', '毫州', '25', '2');
INSERT INTO `ask_areas` VALUES ('305', '南昌', '26', '2');
INSERT INTO `ask_areas` VALUES ('306', '景德镇', '26', '2');
INSERT INTO `ask_areas` VALUES ('307', '萍乡', '26', '2');
INSERT INTO `ask_areas` VALUES ('308', '新余', '26', '2');
INSERT INTO `ask_areas` VALUES ('309', '九江', '26', '2');
INSERT INTO `ask_areas` VALUES ('310', '鹰潭', '26', '2');
INSERT INTO `ask_areas` VALUES ('311', '上饶', '26', '2');
INSERT INTO `ask_areas` VALUES ('312', '宜春', '26', '2');
INSERT INTO `ask_areas` VALUES ('313', '抚州', '26', '2');
INSERT INTO `ask_areas` VALUES ('314', '吉安', '26', '2');
INSERT INTO `ask_areas` VALUES ('315', '赣州', '26', '2');
INSERT INTO `ask_areas` VALUES ('316', '武汉', '27', '2');
INSERT INTO `ask_areas` VALUES ('317', '黄石', '27', '2');
INSERT INTO `ask_areas` VALUES ('318', '襄阳', '27', '2');
INSERT INTO `ask_areas` VALUES ('319', '十堰', '27', '2');
INSERT INTO `ask_areas` VALUES ('320', '宜昌', '27', '2');
INSERT INTO `ask_areas` VALUES ('321', '荆州', '27', '2');
INSERT INTO `ask_areas` VALUES ('322', '鄂州', '27', '2');
INSERT INTO `ask_areas` VALUES ('323', '孝感', '27', '2');
INSERT INTO `ask_areas` VALUES ('324', '黄冈', '27', '2');
INSERT INTO `ask_areas` VALUES ('325', '咸宁', '27', '2');
INSERT INTO `ask_areas` VALUES ('326', '荆门', '27', '2');
INSERT INTO `ask_areas` VALUES ('327', '随州', '27', '2');
INSERT INTO `ask_areas` VALUES ('328', '天门', '27', '2');
INSERT INTO `ask_areas` VALUES ('329', '仙桃', '27', '2');
INSERT INTO `ask_areas` VALUES ('330', '潜江', '27', '2');
INSERT INTO `ask_areas` VALUES ('331', '神农架林区', '27', '2');
INSERT INTO `ask_areas` VALUES ('332', '恩施自治州', '27', '2');
INSERT INTO `ask_areas` VALUES ('333', '成都', '28', '2');
INSERT INTO `ask_areas` VALUES ('334', '自贡', '28', '2');
INSERT INTO `ask_areas` VALUES ('335', '广安', '28', '2');
INSERT INTO `ask_areas` VALUES ('336', '攀枝花', '28', '2');
INSERT INTO `ask_areas` VALUES ('337', '泸州', '28', '2');
INSERT INTO `ask_areas` VALUES ('338', '德阳', '28', '2');
INSERT INTO `ask_areas` VALUES ('339', '绵阳', '28', '2');
INSERT INTO `ask_areas` VALUES ('340', '广元', '28', '2');
INSERT INTO `ask_areas` VALUES ('341', '遂宁', '28', '2');
INSERT INTO `ask_areas` VALUES ('342', '内江', '28', '2');
INSERT INTO `ask_areas` VALUES ('343', '乐山', '28', '2');
INSERT INTO `ask_areas` VALUES ('344', '宜宾', '28', '2');
INSERT INTO `ask_areas` VALUES ('345', '南充', '28', '2');
INSERT INTO `ask_areas` VALUES ('346', '资阳', '28', '2');
INSERT INTO `ask_areas` VALUES ('347', '雅安', '28', '2');
INSERT INTO `ask_areas` VALUES ('348', '巴中', '28', '2');
INSERT INTO `ask_areas` VALUES ('349', '达州', '28', '2');
INSERT INTO `ask_areas` VALUES ('350', '眉山', '28', '2');
INSERT INTO `ask_areas` VALUES ('351', '甘孜', '28', '2');
INSERT INTO `ask_areas` VALUES ('352', '凉山', '28', '2');
INSERT INTO `ask_areas` VALUES ('353', '阿坝', '28', '2');
INSERT INTO `ask_areas` VALUES ('354', '贵阳', '29', '2');
INSERT INTO `ask_areas` VALUES ('355', '六盘水', '29', '2');
INSERT INTO `ask_areas` VALUES ('356', '遵义', '29', '2');
INSERT INTO `ask_areas` VALUES ('357', '铜仁', '29', '2');
INSERT INTO `ask_areas` VALUES ('358', '毕节', '29', '2');
INSERT INTO `ask_areas` VALUES ('359', '安顺', '29', '2');
INSERT INTO `ask_areas` VALUES ('360', '黔东南苗族侗族自治州', '29', '2');
INSERT INTO `ask_areas` VALUES ('361', '黔南布依族苗族自治州', '29', '2');
INSERT INTO `ask_areas` VALUES ('362', '黔西南布依族苗族自治州', '29', '2');
INSERT INTO `ask_areas` VALUES ('363', '昆明', '30', '2');
INSERT INTO `ask_areas` VALUES ('364', '昭通', '30', '2');
INSERT INTO `ask_areas` VALUES ('365', '曲靖', '30', '2');
INSERT INTO `ask_areas` VALUES ('366', '玉溪', '30', '2');
INSERT INTO `ask_areas` VALUES ('367', '普洱', '30', '2');
INSERT INTO `ask_areas` VALUES ('368', '临沧', '30', '2');
INSERT INTO `ask_areas` VALUES ('369', '保山', '30', '2');
INSERT INTO `ask_areas` VALUES ('370', '丽江', '30', '2');
INSERT INTO `ask_areas` VALUES ('371', '文山', '30', '2');
INSERT INTO `ask_areas` VALUES ('372', '红河', '30', '2');
INSERT INTO `ask_areas` VALUES ('373', '西双版纳', '30', '2');
INSERT INTO `ask_areas` VALUES ('374', '楚雄', '30', '2');
INSERT INTO `ask_areas` VALUES ('375', '大理', '30', '2');
INSERT INTO `ask_areas` VALUES ('376', '德宏', '30', '2');
INSERT INTO `ask_areas` VALUES ('377', '怒江', '30', '2');
INSERT INTO `ask_areas` VALUES ('378', '迪庆', '30', '2');
INSERT INTO `ask_areas` VALUES ('379', '拉萨', '31', '2');
INSERT INTO `ask_areas` VALUES ('380', '那曲', '31', '2');
INSERT INTO `ask_areas` VALUES ('381', '昌都', '31', '2');
INSERT INTO `ask_areas` VALUES ('382', '山南', '31', '2');
INSERT INTO `ask_areas` VALUES ('383', '日喀则', '31', '2');
INSERT INTO `ask_areas` VALUES ('384', '阿里', '31', '2');
INSERT INTO `ask_areas` VALUES ('385', '林芝', '31', '2');
-- ----------------------------
-- Table structure for ask_articles
-- ----------------------------
DROP TABLE IF EXISTS `ask_articles`;
CREATE TABLE `ask_articles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '文章发起人',
`logo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`category_id` int(11) NOT NULL DEFAULT '0' COMMENT '',
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '文章标题',
`summary` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '导读、摘要',
`content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '文章内容',
`views` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '查看数',
`collections` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '收藏数',
`comments` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评论数',
`supports` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '支持数、推荐数目',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态0待审核,1已审核',
`device` tinyint(4) NOT NULL DEFAULT '1' COMMENT '提问设备类型1pc,2安卓,3IOS,4weixin',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `articles_user_id_index` (`user_id`),
KEY `articles_category_id_index` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '文章表';
-- ----------------------------
-- Records of ask_articles
-- ----------------------------
-- ----------------------------
-- Table structure for ask_attentions
-- ----------------------------
DROP TABLE IF EXISTS `ask_attentions`;
CREATE TABLE `ask_attentions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`source_id` int(10) unsigned NOT NULL COMMENT '',
`source_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `attentions_source_id_source_type_index` (`source_id`,`source_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_attentions
-- ----------------------------
-- ----------------------------
-- Table structure for ask_authentications
-- ----------------------------
DROP TABLE IF EXISTS `ask_authentications`;
CREATE TABLE `ask_authentications` (
`user_id` int(10) unsigned NOT NULL COMMENT '用户UID',
`category_id` int(11) NOT NULL DEFAULT '0' COMMENT '',
`real_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`province` smallint(6) DEFAULT NULL COMMENT '',
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`description` text COLLATE utf8_unicode_ci,
`gender` tinyint(4) DEFAULT NULL COMMENT '',
`city` smallint(6) DEFAULT NULL COMMENT '',
`id_card` varchar(32) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`id_card_image` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`skill` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`skill_image` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`failed_reason` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`user_id`),
KEY `authentications_category_id_index` (`category_id`),
KEY `authentications_province_index` (`province`),
KEY `authentications_city_index` (`city`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_authentications
-- ----------------------------
-- ----------------------------
-- Table structure for ask_categories
-- ----------------------------
DROP TABLE IF EXISTS `ask_categories`;
CREATE TABLE `ask_categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '上级栏目id',
`grade` int(11) NOT NULL DEFAULT '1' COMMENT '层级',
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '分类名称',
`icon` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '图标',
`slug` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`type` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
`role_id` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`status` smallint(6) NOT NULL DEFAULT '1' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
UNIQUE KEY `categories_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '分类表';
-- ----------------------------
-- Records of ask_categories
-- ----------------------------
INSERT INTO `ask_categories` VALUES ('1', '0', '1', '默认分类', NULL, 'default', 'questions,articles,tags,experts', '0', NULL, '1', '2016-09-29 18:25:54', '2016-09-29 18:28:05');
-- ----------------------------
-- Table structure for ask_collections
-- ----------------------------
DROP TABLE IF EXISTS `ask_collections`;
CREATE TABLE `ask_collections` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`source_id` int(10) unsigned NOT NULL COMMENT '',
`source_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`subject` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `collections_source_id_source_type_index` (`source_id`,`source_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '收藏表';
-- ----------------------------
-- Records of ask_collections
-- ----------------------------
-- ----------------------------
-- Table structure for ask_comments
-- ----------------------------
DROP TABLE IF EXISTS `ask_comments`;
CREATE TABLE `ask_comments` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '评论人',
`content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '评论内容',
`source_id` int(10) unsigned NOT NULL COMMENT '',
`source_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`to_user_id` int(10) unsigned DEFAULT NULL COMMENT '',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '',
`supports` int(11) NOT NULL DEFAULT '0' COMMENT '',
`device` tinyint(4) NOT NULL DEFAULT '1' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `comments_source_id_source_type_index` (`source_id`,`source_type`),
KEY `comments_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '评论表';
-- ----------------------------
-- Records of ask_comments
-- ----------------------------
-- ----------------------------
-- Table structure for ask_credits
-- ----------------------------
DROP TABLE IF EXISTS `ask_credits`;
CREATE TABLE `ask_credits` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`action` char(16) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`source_id` int(10) unsigned NOT NULL COMMENT '问题、回答或文字ID',
`source_subject` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '问题标题或文字标题等',
`coins` int(11) NOT NULL DEFAULT '0' COMMENT '',
`credits` int(11) NOT NULL DEFAULT '0' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `credits_user_id_index` (`user_id`),
KEY `credits_source_id_index` (`source_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_credits
-- ----------------------------
-- ----------------------------
-- Table structure for ask_doings
-- ----------------------------
DROP TABLE IF EXISTS `ask_doings`;
CREATE TABLE `ask_doings` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`action` char(16) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`source_id` int(10) unsigned NOT NULL COMMENT '',
`source_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`subject` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`content` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`refer_id` int(10) unsigned NOT NULL COMMENT '',
`refer_user_id` int(10) unsigned NOT NULL COMMENT '',
`refer_content` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `doings_source_id_source_type_index` (`source_id`,`source_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_doings
-- ----------------------------
-- ----------------------------
-- Table structure for ask_email_tokens
-- ----------------------------
DROP TABLE IF EXISTS `ask_email_tokens`;
CREATE TABLE `ask_email_tokens` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`action` varchar(32) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`token` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `email_tokens_email_index` (`email`),
KEY `email_tokens_token_index` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_email_tokens
-- ----------------------------
-- ----------------------------
-- Table structure for ask_exchanges
-- ----------------------------
DROP TABLE IF EXISTS `ask_exchanges`;
CREATE TABLE `ask_exchanges` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`goods_id` int(10) unsigned NOT NULL COMMENT '',
`coins` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`real_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`phone` varchar(24) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`email` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`comment` varchar(512) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `exchanges_user_id_index` (`user_id`),
KEY `exchanges_goods_id_index` (`goods_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_exchanges
-- ----------------------------
-- ----------------------------
-- Table structure for ask_failed_jobs
-- ----------------------------
DROP TABLE IF EXISTS `ask_failed_jobs`;
CREATE TABLE `ask_failed_jobs` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`connection` text COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`queue` text COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`payload` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_failed_jobs
-- ----------------------------
-- ----------------------------
-- Table structure for ask_friendship_links
-- ----------------------------
DROP TABLE IF EXISTS `ask_friendship_links`;
CREATE TABLE `ask_friendship_links` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '名称',
`slogan` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`url` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '网址',
`sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态1有效0无效',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '友情链接';
-- ----------------------------
-- Records of ask_friendship_links
-- ----------------------------
INSERT INTO `ask_friendship_links` VALUES ('1', 'tipask问答网', '国内最好PHP开源的问答系统', 'http://wenda.tipask.com', '1', '1', '2016-05-10 18:25:54', '2016-05-10 18:28:05');
-- ----------------------------
-- Table structure for ask_goods
-- ----------------------------
DROP TABLE IF EXISTS `ask_goods`;
CREATE TABLE `ask_goods` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`logo` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`name` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`description` text COLLATE utf8_unicode_ci,
`coins` int(11) NOT NULL COMMENT '',
`remnants` int(11) NOT NULL COMMENT '',
`post_type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '',
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_goods
-- ----------------------------
-- ----------------------------
-- Table structure for ask_jobs
-- ----------------------------
DROP TABLE IF EXISTS `ask_jobs`;
CREATE TABLE `ask_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`queue` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`payload` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`attempts` tinyint(3) unsigned NOT NULL COMMENT '',
`reserved` tinyint(3) unsigned NOT NULL COMMENT '',
`reserved_at` int(10) unsigned DEFAULT NULL COMMENT '',
`available_at` int(10) unsigned NOT NULL COMMENT '',
`created_at` int(10) unsigned NOT NULL COMMENT '',
PRIMARY KEY (`id`),
KEY `jobs_queue_reserved_reserved_at_index` (`queue`,`reserved`,`reserved_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_jobs
-- ----------------------------
-- ----------------------------
-- Table structure for ask_messages
-- ----------------------------
DROP TABLE IF EXISTS `ask_messages`;
CREATE TABLE `ask_messages` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`from_user_id` int(10) unsigned NOT NULL COMMENT '',
`to_user_id` int(10) unsigned NOT NULL COMMENT '',
`content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`is_read` tinyint(3) unsigned NOT NULL COMMENT '',
`from_deleted` tinyint(3) unsigned NOT NULL COMMENT '',
`to_deleted` tinyint(3) unsigned NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_messages
-- ----------------------------
-- ----------------------------
-- Table structure for ask_migrations
-- ----------------------------
DROP TABLE IF EXISTS `ask_migrations`;
CREATE TABLE `ask_migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_migrations
-- ----------------------------
INSERT INTO `ask_migrations` VALUES ('2014_10_12_000000_create_users_table', '1');
INSERT INTO `ask_migrations` VALUES ('2014_10_12_100000_create_email_tokens_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_01_15_105324_create_roles_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_01_15_114412_create_role_user_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_01_26_115212_create_permissions_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_01_26_115523_create_permission_role_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_02_09_132439_create_permission_user_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_09_09_033353_create_questions_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_10_09_154125_create_answers_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_10_14_202058_create_user_data_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_10_16_173405_create_areas_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_11_13_163708_create_tags_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_11_25_124050_create_credits_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_11_27_155528_create_settings_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_12_04_120431_create_doings_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_12_14_144438_create_comments_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_12_21_120443_create_notifications_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_12_22_192137_create_collections_table', '1');
INSERT INTO `ask_migrations` VALUES ('2015_12_23_173149_create_attentions_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_01_07_174607_create_taggables_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_01_08_193754_create_supports_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_01_14_154209_create_articles_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_02_15_184106_create_messages_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_02_18_170935_create_notices_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_02_19_173117_create_recommendations_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_03_09_160615_create_question_invitations_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_05_05_173205_create_goods_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_05_05_174022_create_exchanges_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_05_10_164740_create_friendship_links_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_05_11_163810_create_authentications_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_06_13_112300_create_jobs_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_06_13_112327_create_failed_jobs_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_06_27_163138_create_user_oauth_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_09_19_231131_create_category_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_11_25_160245_add_logo_for_articles', '1');
INSERT INTO `ask_migrations` VALUES ('2016_12_02_183440_comment_add_support_field', '1');
INSERT INTO `ask_migrations` VALUES ('2016_12_10_161032_create_user_tag_table_table', '1');
INSERT INTO `ask_migrations` VALUES ('2016_12_15_100932_alter_question_invitation_add_sendto', '1');
INSERT INTO `ask_migrations` VALUES ('2017_03_06_114416_modify_authentication_table', '1');
INSERT INTO `ask_migrations` VALUES ('2017_04_12_112215_add_qrcode_for_users_table', '1');
-- ----------------------------
-- Table structure for ask_notices
-- ----------------------------
DROP TABLE IF EXISTS `ask_notices`;
CREATE TABLE `ask_notices` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '公告主题',
`url` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '公告链接地址',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态1有效0无效',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_notices
-- ----------------------------
-- ----------------------------
-- Table structure for ask_notifications
-- ----------------------------
DROP TABLE IF EXISTS `ask_notifications`;
CREATE TABLE `ask_notifications` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`to_user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`type` char(32) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`source_id` int(10) unsigned NOT NULL COMMENT '',
`subject` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`content` text COLLATE utf8_unicode_ci,
`refer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`refer_type` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`is_read` tinyint(4) NOT NULL DEFAULT '0' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `notifications_to_user_id_index` (`to_user_id`),
KEY `notifications_source_id_index` (`source_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_notifications
-- ----------------------------
-- ----------------------------
-- Table structure for ask_permissions
-- ----------------------------
DROP TABLE IF EXISTS `ask_permissions`;
CREATE TABLE `ask_permissions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
UNIQUE KEY `permissions_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_permissions
-- ----------------------------
INSERT INTO `ask_permissions` VALUES ('1', '后台管理首页', 'admin.index.index', '后台管理首页', NULL, '2016-02-16 17:57:51', '2016-02-16 17:57:51');
-- ----------------------------
-- Table structure for ask_permission_role
-- ----------------------------
DROP TABLE IF EXISTS `ask_permission_role`;
CREATE TABLE `ask_permission_role` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`permission_id` int(10) unsigned NOT NULL COMMENT '',
`role_id` int(10) unsigned NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `permission_role_permission_id_index` (`permission_id`),
KEY `permission_role_role_id_index` (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_permission_role
-- ----------------------------
INSERT INTO `ask_permission_role` VALUES ('1', '1', '1', '2016-02-16 17:37:51', '2016-04-16 17:57:51');
-- ----------------------------
-- Table structure for ask_permission_user
-- ----------------------------
DROP TABLE IF EXISTS `ask_permission_user`;
CREATE TABLE `ask_permission_user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`permission_id` int(10) unsigned NOT NULL COMMENT '',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `permission_user_permission_id_index` (`permission_id`),
KEY `permission_user_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_permission_user
-- ----------------------------
-- ----------------------------
-- Table structure for ask_questions
-- ----------------------------
DROP TABLE IF EXISTS `ask_questions`;
CREATE TABLE `ask_questions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '问题发起人UID',
`category_id` int(11) NOT NULL DEFAULT '0' COMMENT '分类id',
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '标题',
`description` text COLLATE utf8_unicode_ci COMMENT '问题详情',
`price` smallint(6) NOT NULL DEFAULT '0' COMMENT '问题价格',
`hide` tinyint(4) NOT NULL DEFAULT '0' COMMENT '匿名提问',
`answers` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '回答数',
`views` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '查看数',
`followers` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '关注数',
`collections` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '收藏数',
`comments` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评论数',
`device` tinyint(4) NOT NULL DEFAULT '1' COMMENT '提问设备类型1pc,2安卓,3IOS,4weixin',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '提问状态0待审核,1已审核',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `questions_created_at_index` (`created_at`),
KEY `questions_updated_at_index` (`updated_at`),
KEY `questions_user_id_index` (`user_id`),
KEY `questions_title_index` (`title`),
KEY `questions_category_id_index` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='问题表';
-- ----------------------------
-- Records of ask_questions
-- ----------------------------
-- ----------------------------
-- Table structure for ask_question_invitations
-- ----------------------------
DROP TABLE IF EXISTS `ask_question_invitations`;
CREATE TABLE `ask_question_invitations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`from_user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`send_to` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`question_id` int(10) unsigned NOT NULL COMMENT '问题id',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '回答状态0待审核,1已审核',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `question_invitations_user_id_index` (`user_id`),
KEY `question_invitations_question_id_index` (`question_id`),
KEY `question_invitations_send_to_index` (`send_to`),
KEY `question_invitations_from_user_id_index` (`from_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_question_invitations
-- ----------------------------
-- ----------------------------
-- Table structure for ask_recommendations
-- ----------------------------
DROP TABLE IF EXISTS `ask_recommendations`;
CREATE TABLE `ask_recommendations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '主题',
`url` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '链接地址',
`logo` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '链接logo',
`sort` tinyint(4) NOT NULL COMMENT '排序字段 ASC',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_recommendations
-- ----------------------------
-- ----------------------------
-- Table structure for ask_roles
-- ----------------------------
DROP TABLE IF EXISTS `ask_roles`;
CREATE TABLE `ask_roles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`level` int(11) NOT NULL DEFAULT '1' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
UNIQUE KEY `roles_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_roles
-- ----------------------------
INSERT INTO `ask_roles` VALUES ('1', '后台管理员', 'admin', '后台管理员,具有最高权限', '1', '2016-02-16 09:52:13', '2016-02-16 09:52:13');
INSERT INTO `ask_roles` VALUES ('2', '普通会员', 'member', '普通会员,不可管理后台', '1', '2016-02-16 09:52:13', '2016-02-16 09:52:13');
-- ----------------------------
-- Table structure for ask_role_user
-- ----------------------------
DROP TABLE IF EXISTS `ask_role_user`;
CREATE TABLE `ask_role_user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`role_id` int(10) unsigned NOT NULL COMMENT '',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `role_user_role_id_index` (`role_id`),
KEY `role_user_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_role_user
-- ----------------------------
-- ----------------------------
-- Table structure for ask_settings
-- ----------------------------
DROP TABLE IF EXISTS `ask_settings`;
CREATE TABLE `ask_settings` (
`name` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '设置名称',
`value` text COLLATE utf8_unicode_ci COMMENT '设置备注',
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_settings
-- ----------------------------
INSERT INTO `ask_settings` VALUES ('coins_adopted', '0');
INSERT INTO `ask_settings` VALUES ('coins_answer', '0');
INSERT INTO `ask_settings` VALUES ('coins_ask', '0');
INSERT INTO `ask_settings` VALUES ('coins_login', '0');
INSERT INTO `ask_settings` VALUES ('coins_register', '20');
INSERT INTO `ask_settings` VALUES ('coins_write_article', '0');
INSERT INTO `ask_settings` VALUES ('credits_adopted', '20');
INSERT INTO `ask_settings` VALUES ('credits_answer', '10');
INSERT INTO `ask_settings` VALUES ('credits_ask', '0');
INSERT INTO `ask_settings` VALUES ('credits_login', '10');
INSERT INTO `ask_settings` VALUES ('credits_register', '20');
INSERT INTO `ask_settings` VALUES ('credits_write_article', '0');
INSERT INTO `ask_settings` VALUES ('date_format', 'Y-m-d');
INSERT INTO `ask_settings` VALUES ('time_diff', '0');
INSERT INTO `ask_settings` VALUES ('time_format', 'H:i');
INSERT INTO `ask_settings` VALUES ('time_friendly', '1');
INSERT INTO `ask_settings` VALUES ('time_offset', '8');
INSERT INTO `ask_settings` VALUES ('website_admin_email', '531306805@qq.com');
INSERT INTO `ask_settings` VALUES ('website_cache_time', '1');
INSERT INTO `ask_settings` VALUES ('website_footer', '');
INSERT INTO `ask_settings` VALUES ('website_header', '');
INSERT INTO `ask_settings` VALUES ('website_icp', '');
INSERT INTO `ask_settings` VALUES ('website_name', 'javaask问答网');
INSERT INTO `ask_settings` VALUES ('website_url', 'localhost');
-- ----------------------------
-- Table structure for ask_supports
-- ----------------------------
DROP TABLE IF EXISTS `ask_supports`;
CREATE TABLE `ask_supports` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`session_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`user_id` int(10) unsigned DEFAULT NULL COMMENT '',
`supportable_id` int(10) unsigned NOT NULL COMMENT '',
`supportable_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `supports_supportable_id_supportable_type_index` (`supportable_id`,`supportable_type`),
KEY `supports_session_id_index` (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_supports
-- ----------------------------
-- ----------------------------
-- Table structure for ask_taggables
-- ----------------------------
DROP TABLE IF EXISTS `ask_taggables`;
CREATE TABLE `ask_taggables` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`tag_id` int(10) unsigned NOT NULL COMMENT '标签ID',
`taggable_id` int(10) unsigned NOT NULL COMMENT '',
`taggable_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `taggables_taggable_id_taggable_type_index` (`taggable_id`,`taggable_type`),
KEY `taggables_tag_id_index` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_taggables
-- ----------------------------
-- ----------------------------
-- Table structure for ask_tags
-- ----------------------------
DROP TABLE IF EXISTS `ask_tags`;
CREATE TABLE `ask_tags` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '标签名称',
`category_id` int(11) NOT NULL DEFAULT '0' COMMENT '',
`logo` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '标签图标',
`summary` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '导读、摘要',
`description` text COLLATE utf8_unicode_ci COMMENT '标签介绍',
`parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`followers` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '关注数',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
UNIQUE KEY `tags_name_unique` (`name`),
KEY `tags_parent_id_index` (`parent_id`),
KEY `tags_followers_index` (`followers`),
KEY `tags_category_id_index` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_tags
-- ----------------------------
-- ----------------------------
-- Table structure for ask_users
-- ----------------------------
DROP TABLE IF EXISTS `ask_users`;
CREATE TABLE `ask_users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '姓名',
`email` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT '登录邮箱',
`mobile` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '登录手机',
`password` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '登录密码',
`gender` tinyint(4) DEFAULT NULL COMMENT '性别: 1-男,2-女,0-保密',
`birthday` date DEFAULT NULL COMMENT '出生日期',
`province` smallint(6) DEFAULT NULL COMMENT '居住省份',
`city` smallint(6) DEFAULT NULL COMMENT '居住城市',
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '头衔',
`description` text COLLATE utf8_unicode_ci COMMENT '个人简介',
`qrcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用户状态0-待审核,1已审核',
`site_notifications` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '站内通知',
`email_notifications` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '邮件通知策略',
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '记住登录状态',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`),
KEY `users_name_index` (`name`),
KEY `users_mobile_index` (`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_users
-- ----------------------------
INSERT INTO `ask_users` VALUES ('1', 'admin', '531306805@qq.com', NULL, '$2y$10$9xGUXaRHypyrdqnjOU5AeOwncQwvslujjb/bbdWWI9uL3VQZGzKTu', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1', 'answer,reply_comment,comment_question,comment_answer,comment_article,follow_question,invite_answer,adopt_answer,create_article,follow_user', 'adopt_answer,invite_answer', NULL, '2018-06-21 11:32:58', '2018-06-21 11:32:58');
-- ----------------------------
-- Table structure for ask_user_data
-- ----------------------------
DROP TABLE IF EXISTS `ask_user_data`;
CREATE TABLE `ask_user_data` (
`user_id` int(10) unsigned NOT NULL COMMENT '',
`coins` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`credits` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`registered_at` timestamp NULL DEFAULT NULL COMMENT '',
`last_visit` timestamp NULL DEFAULT NULL COMMENT '',
`last_login_ip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`questions` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`articles` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`answers` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`adoptions` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`supports` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`followers` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`views` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`email_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '',
`mobile_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '',
`authentication_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '',
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_user_data
-- ----------------------------
INSERT INTO `ask_user_data` VALUES ('1', '0', '20', '2018-06-21 11:32:58', '2018-06-21 11:32:58', '::1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
-- ----------------------------
-- Table structure for ask_user_oauth
-- ----------------------------
DROP TABLE IF EXISTS `ask_user_oauth`;
CREATE TABLE `ask_user_oauth` (
`id` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`auth_type` char(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`nickname` char(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`avatar` char(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '',
`access_token` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT '',
`refresh_token` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '',
`expires_in` int(11) NOT NULL COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `user_oauth_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '用户授权登录表';
-- ----------------------------
-- Records of ask_user_oauth
-- ----------------------------
-- ----------------------------
-- Table structure for ask_user_tags
-- ----------------------------
DROP TABLE IF EXISTS `ask_user_tags`;
CREATE TABLE `ask_user_tags` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(10) unsigned NOT NULL COMMENT '',
`tag_id` int(10) unsigned NOT NULL COMMENT '',
`questions` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`articles` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`answers` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`supports` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`adoptions` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `user_tags_user_id_index` (`user_id`),
KEY `user_tags_tag_id_index` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT '';
-- ----------------------------
-- Records of ask_user_tags
-- ----------------------------
相关推荐
Tipask问答系统 v3.3.1更新日志 1、加入了签到功能 (需要在后台积分策略配置页面重新配置签到的策略,否则签到功能无效果) 2、加入了极验验证,提高了验证码用户体验 3、加入了图片水印、讨论模式、自问自答等...
tipask3.3.1版本版本更新内如如下:1、加入了签到功能 (需要在后台积分策略配置页面重新配置签到的策略,否则签到功能无效果)2、加入了极验验证,提高了验证码用户体验3、加入了图片水印、讨论模式、自问自答等...
PHP实例开发源码—Tipask问答系统 php版 v3.3.1 正式版.zip PHP实例开发源码—Tipask问答系统 php版 v3.3.1 正式版.zip PHP实例开发源码—Tipask问答系统 php版 v3.3.1 正式版.zip
【标题】基于PHP的Tipask问答系统php版v3.3.1正式版源码 在互联网技术领域,问答系统是一种常见的互动平台,它允许用户提出问题并邀请其他用户或专家进行回答。Tipask问答系统是一款基于PHP开发的开源软件,专为...
2. **数据库文件**:可能包含SQL脚本,用于创建和初始化Tipask问答系统的数据库结构,如用户表、问题表、答案表、评论表等。 3. **配置文件**:`.ini`或`.php`格式,存储系统设置,如数据库连接信息、网站URL、管理...
Tipask问答系统 3.3.1 更新日志:2018-06-011.加入了签到功能(需要在后台积分策略配置页面重新配置签到的策略,否则签到功能无效果);2.加入了极验验证,提高了验证码用户体验;3.加入了图片水印、讨论模式、自问自...
经过1年多的设计、开发和1个多月的测试,Tipask社区版v3.0beta版本正式发布了! 目前系统整体构架php框架采用的是Laravel 前端 Bootstrap , 系统采用了大量的PHP新特性,整个系统从性能、安全、大数据处理都做了很...
《Tipask_v2.5正式版:开源问答系统解析与应用》 Tipask_v2.5正式版是一款基于开源许可的在线问答系统,它为用户提供了一个互动性极强的平台,便于用户分享知识、提问与解答问题。这款软件在2014年5月11日发布了GBK...
Tipask问答系统作为初学者的练习项目,有助于了解Web开发的基本流程,包括前端页面搭建、后端接口设计、数据库操作以及服务器配置。同时,你可以通过修改源代码来定制自己的功能,提升编程技能。 总的来说,Tipask...
从【压缩包子文件的文件名称列表】"tipask_V3.5"来看,这可能是tipask短信插件的一个版本,版本号3.5可能意味着这是一个相对成熟的版本,包含了一些新特性和改进。通常,升级到新版本可以获取到更好的性能、更多的...
《Tipask_v2.0Beta_GBK_20120322——开源问答系统解析》 在互联网技术日新月异的今天,开源软件以其开放性、灵活性和社区支持的优势,逐渐成为开发者和学习者的重要工具。"Tipask_v2.0Beta_GBK_20120322"正是一款...
【Tipask问答系统】是一个基于源码开发的在线问答平台,它允许用户提出问题、分享知识,并通过社区互动寻求解答。作为一个开源项目,Tipask提供了丰富的功能,旨在促进技术交流和学习,帮助开发者解决问题和提升技能...
MySQL是Tipask用来存储用户数据、问题、答案和评论的关系型数据库管理系统(RDBMS)。MySQL以其高性能、可靠性和易于使用而闻名,是许多Web应用程序首选的数据存储解决方案。在Tipask中,数据库设计可能包括用户表、...
2. **负载能力与稳定性**:Tipask问答系统在设计时考虑到了高并发场景,通过优化数据库查询、缓存策略以及使用负载均衡技术,确保在用户量激增时仍能保持平稳运行,保证了系统的可用性和用户体验。 3. **微信和手机...
源码中的数据库脚本将揭示这些表的字段设计,以及它们之间的关联关系,如用户ID如何在各个表中引用,以实现用户行为的跟踪。 3. **用户认证与权限管理** Tipask系统应该有用户注册、登录功能,并对用户的操作进行...
1. 通过ftp工具,将 ./tipask 目录中的所有文件上传到服务器上。 2. 在浏览器中访问: http://本程序访问URL/install/ 3. 请根据向导,填入必要的信息,开始安装。 特别注意的是,要根据安装向导的提示,正确设置...
4. tipask:这个文件名可能是一个压缩文件、代码库或者数据库,包含了tipask问答系统的主要源代码、配置文件、数据库脚本等关键组成部分。用户可能需要解压并按照readme.txt的指示进行操作,以便于安装和运行该问答...
Tipask是一款开放源码的PHP问答系统,基于Laravel框架开发,容易扩展,具有强大的负载能力和稳定性。支持微信、手机登陆注册,支持悬赏提问,支持支付宝微信充值,...。。。更多特性请直接下载体验。 tipask3.3.1版本版