🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
~~~[sql] CREATE TABLE `xi_stores` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `cate_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID', `auditd_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '审核者ID', `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '门店类型,1=>B2C,2=>O2O,3=>O2O(支持预约配送)', `name` varchar(64) NOT NULL DEFAULT '' COMMENT '名称', `thumb` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '缩略图', `banner` varchar(512) NOT NULL DEFAULT 'a:1:{i:0;s:53:"http://oss.dgyouduo.com/static/img/no-image-16x10.png";}' COMMENT '横幅', `notice` varchar(32) NOT NULL DEFAULT '欢迎光临,很高兴为您服务' COMMENT '公告', `mobile` varchar(16) NOT NULL DEFAULT '' COMMENT '手机号码', `realname` varchar(16) NOT NULL COMMENT '真实姓名', `idcard_number` varchar(32) NOT NULL COMMENT '身份证号码', `idcard_image` varchar(255) NOT NULL COMMENT '身份证图片', `business_license_number` varchar(64) NOT NULL COMMENT '营业执照号码', `business_license_image` varchar(255) NOT NULL COMMENT '营业执照图片', `industry_additional_image` varchar(255) NOT NULL COMMENT '行业附加图片', `province` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份', `city` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市', `district` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '地区', `twon` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '乡镇', `address` varchar(128) NOT NULL COMMENT '地址', `longitude` varchar(16) NOT NULL COMMENT '经度', `latitude` varchar(16) NOT NULL DEFAULT '' COMMENT '纬度', `business_hours_start` varchar(8) NOT NULL DEFAULT '7' COMMENT '开始营业时间', `business_hours_end` varchar(8) NOT NULL DEFAULT '24' COMMENT '结束营业时间', `template_style` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '模板样式,1=>1列(O2O),2=>2列(B2C)', `delivery_scope` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '配送范围(O2O商家),1=>直径,2=>区域画点', `delivery_setting` text NOT NULL COMMENT '配送设定', `delivery_time` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '配送时间限定(小时,O2O商家)', `delivery_goods_min_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '配送商品最小价格', `delivery_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '配送价格', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `sales` int(11) NOT NULL COMMENT '销量', `is_support_two` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持二级分类', `is_support_express` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持快递', `is_support_self_pickup` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持自取', `is_support_delivery` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持配送', `is_support_make_delivery` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持预约配送', `is_self_delivery` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否自配送', `is_audit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否审核,0=>未审核,1=>审核通过,2=>审核驳回', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', `auditd_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '审核时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='门店'; ~~~ ~~~[sql] CREATE TABLE `xi_stores_audit_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `stores_id` int(11) unsigned NOT NULL COMMENT '门店ID', `admin_id` int(11) unsigned NOT NULL COMMENT '用户ID', `operate` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '操作,1=>审核通过,2=>审核驳回', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='门店审核日志'; ~~~ ~~~[sql] CREATE TABLE `xi_stores_category` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父ID', `parent_id_path` varchar(32) NOT NULL DEFAULT '' COMMENT '父ID路径', `level` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '级别', `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '门店类型,1=>B2C,2=>O2O,3=>O2O(支持预约配送)', `name` varchar(32) NOT NULL DEFAULT '' COMMENT '名称', `thumb` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '缩略图', `template_style` tinyint(1) NOT NULL DEFAULT '1' COMMENT '模板样式,1=>1列(O2O),2=>2列(B2C)', `delivery_scope` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '配送范围(O2O商家),1=>直径,2=>区域画点', `delivery_setting` varchar(255) NOT NULL COMMENT '配送设定', `delivery_time` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '配送时间限定(小时,O2O商家)', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_support_two` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持二级分类', `is_support_express` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持快递', `is_support_self_pickup` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持自取', `is_support_delivery` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持配送', `is_support_make_delivery` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否支持预约配送', `is_self_delivery` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否自配送', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`parent_id`,`type`,`is_trash`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='门店分类'; ~~~ ~~~[sql] CREATE TABLE `xi_stores_distributor` ( `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `distributor_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '配送员ID', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', KEY `stores_id` (`stores_id`), KEY `distributor_id` (`distributor_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='门店配送员'; ~~~