
-- -----------------------------
-- Table structure for `mall_stat`
-- -----------------------------
DROP TABLE IF EXISTS `mall_stat`;
CREATE TABLE `mall_stat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `date` varchar(255) NOT NULL DEFAULT '' COMMENT '日期',
  `date_time` int(11) NOT NULL DEFAULT '0' COMMENT '时间戳',
  `order_num` int(11) NOT NULL DEFAULT '0' COMMENT '订单总数',
  `sale_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '销售总额',
  `refund_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '退款总额',
  `access_sum` int(11) NOT NULL DEFAULT '0' COMMENT '访问数',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- -----------------------------
-- Records of `mall_stat`
-- -----------------------------
INSERT INTO `mall_stat` VALUES
('1', '2', '2025-04-02', '1743523200', '3', '0.01', '0.00', '0'),
('2', '2', '2025-04-08', '1744041600', '10', '0.96', '0.03', '0'),
('3', '3', '2025-04-09', '1744128000', '3', '0.01', '0.00', '0');

-- -----------------------------
-- Table structure for `mall_active`
-- -----------------------------
DROP TABLE IF EXISTS `mall_active`;
CREATE TABLE `mall_active` (
  `active_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '活动id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `active_name` varchar(255) NOT NULL DEFAULT '' COMMENT '活动名称',
  `active_desc` text COMMENT '活动说明',
  `active_type` varchar(255) NOT NULL DEFAULT '' COMMENT '活动类型(店铺活动，会员活动，商品活动)',
  `active_goods_type` varchar(255) NOT NULL DEFAULT '' COMMENT '商品活动类型（单品，独立商品，店铺整体商品）',
  `active_goods_info` text COMMENT '参与活动商品信息',
  `active_class` varchar(255) NOT NULL DEFAULT '' COMMENT '活动类别',
  `active_class_category` varchar(255) NOT NULL DEFAULT '' COMMENT '活动类别子分类（活动管理）',
  `relate_member` varchar(1000) NOT NULL DEFAULT '' COMMENT '参与会员条件(默认全部)',
  `active_value` text COMMENT '活动扩展信息数据',
  `start_time` int(11) NOT NULL DEFAULT '0' COMMENT '活动开始时间',
  `end_time` int(11) NOT NULL DEFAULT '0' COMMENT '活动结束时间',
  `active_status` varchar(50) NOT NULL DEFAULT '' COMMENT '活动状态',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  `active_order_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '活动累计金额',
  `active_order_num` int(11) NOT NULL DEFAULT '0' COMMENT '活动累计订单数',
  `active_member_num` int(11) NOT NULL DEFAULT '0' COMMENT '活动参与会员数',
  `active_success_num` int(11) NOT NULL DEFAULT '0' COMMENT '活动成功参与会员数',
  PRIMARY KEY (`active_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='店铺营销活动表（整体活动）';

-- -----------------------------
-- Records of `mall_active`
-- -----------------------------
INSERT INTO `mall_active` VALUES
('1', '2', '清明大特惠', '清明大特惠', 'goods', 'single', '[{\"goods_type_name\":\"实物商品\",\"goods_cover_thumb_small\":\"upload/attachment/image/2/202504/01/200x200_1743475733844babe24c1b20be14c53049c43889db_local.png\",\"goods_cover_thumb_mid\":\"upload/attachment/image/2/202504/01/400x400_1743475733844babe24c1b20be14c53049c43889db_local.png\",\"site_id\":2,\"goods_id\":7,\"goods_name\":\"农家饲养猪前槽肉500g\",\"goods_type\":\"real\",\"goods_cover\":\"upload/attachment/image/2/202504/01/1743475733844babe24c1b20be14c53049c43889db_local.png\",\"goods_image\":\"upload/attachment/image/2/202504/01/1743475733844babe24c1b20be14c53049c43889db_local.png\",\"stock\":50,\"sub_title\":\"\",\"goods_desc\":\"<p>商品图片仅供参考，请以实物为准</p>\",\"sku_id\":7,\"sku_name\":\"\",\"price\":\"22.00\",\"skuList\":[{\"sku_id\":7,\"site_id\":2,\"sku_name\":\"\",\"sku_image\":\"upload/attachment/image/2/202504/01/1743475733844babe24c1b20be14c53049c43889db_local.png\",\"sku_no\":\"\",\"goods_id\":7,\"sku_spec_format\":\"\",\"price\":\"22.00\",\"market_price\":\"0.00\",\"sale_price\":\"22.00\",\"cost_price\":\"0.00\",\"stock\":50,\"weight\":\"0.000\",\"volume\":\"0.000\",\"sale_num\":0,\"is_default\":1,\"member_price\":null,\"discount_rate\":\"9\",\"reduce_money\":\"2.20\",\"specify_price\":\"19.80\",\"discount_price\":\"19.80\",\"discount_type\":\"discount\",\"is_enabled\":1}],\"goodsSku\":{\"sku_id\":7,\"site_id\":2,\"sku_name\":\"\",\"sku_image\":\"upload/attachment/image/2/202504/01/1743475733844babe24c1b20be14c53049c43889db_local.png\",\"sku_no\":\"\",\"goods_id\":7,\"sku_spec_format\":\"\",\"price\":\"22.00\",\"market_price\":\"0.00\",\"sale_price\":\"22.00\",\"cost_price\":\"0.00\",\"stock\":50,\"weight\":\"0.000\",\"volume\":\"0.000\",\"sale_num\":0,\"is_default\":1,\"member_price\":null},\"discount_type\":\"discount\",\"discount_rate\":\"9\",\"reduce_money\":\"2.20\",\"specify_price\":\"19.80\",\"is_enabled\":1,\"index\":0,\"valid\":true,\"discount_price\":\"19.80\",\"sku_list\":[{\"sku_id\":7,\"site_id\":2,\"sku_name\":\"\",\"sku_image\":\"upload/attachment/image/2/202504/01/1743475733844babe24c1b20be14c53049c43889db_local.png\",\"sku_no\":\"\",\"goods_id\":7,\"sku_spec_format\":\"\",\"price\":\"22.00\",\"market_price\":\"0.00\",\"sale_price\":\"22.00\",\"cost_price\":\"0.00\",\"stock\":50,\"weight\":\"0.000\",\"volume\":\"0.000\",\"sale_num\":0,\"is_default\":1,\"member_price\":null,\"discount_rate\":\"9\",\"reduce_money\":\"2.20\",\"specify_price\":\"19.80\",\"discount_price\":\"19.80\",\"discount_type\":\"discount\",\"is_enabled\":1}]},{\"goods_type_name\":\"实物商品\",\"goods_cover_thumb_small\":\"upload/attachment/image/2/202504/03/200x200_1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg\",\"goods_cover_thumb_mid\":\"upload/attachment/image/2/202504/03/400x400_1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg\",\"site_id\":2,\"goods_id\":8,\"goods_name\":\"荣昌正宗小罗卤鹅3斤装\",\"goods_type\":\"real\",\"goods_cover\":\"upload/attachment/image/2/202504/03/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg\",\"goods_image\":\"upload/attachment/image/2/202504/03/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg\",\"stock\":10,\"sub_title\":\"\",\"goods_desc\":\"<p>包邮，当日真空包装发出，带酱料包。</p><p>商品图片仅供参考，请以实物为准。</p>\",\"sku_id\":8,\"sku_name\":\"\",\"price\":\"69.80\",\"skuList\":[{\"sku_id\":8,\"site_id\":2,\"sku_name\":\"\",\"sku_image\":\"upload/attachment/image/2/202504/03/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg\",\"sku_no\":\"\",\"goods_id\":8,\"sku_spec_format\":\"\",\"price\":\"69.80\",\"market_price\":\"0.00\",\"sale_price\":\"69.80\",\"cost_price\":\"0.00\",\"stock\":10,\"weight\":\"0.000\",\"volume\":\"0.000\",\"sale_num\":0,\"is_default\":1,\"member_price\":null,\"discount_rate\":\"9\",\"reduce_money\":\"6.98\",\"specify_price\":\"62.82\",\"discount_price\":\"62.82\",\"discount_type\":\"discount\",\"is_enabled\":1}],\"goodsSku\":{\"sku_id\":8,\"site_id\":2,\"sku_name\":\"\",\"sku_image\":\"upload/attachment/image/2/202504/03/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg\",\"sku_no\":\"\",\"goods_id\":8,\"sku_spec_format\":\"\",\"price\":\"69.80\",\"market_price\":\"0.00\",\"sale_price\":\"69.80\",\"cost_price\":\"0.00\",\"stock\":10,\"weight\":\"0.000\",\"volume\":\"0.000\",\"sale_num\":0,\"is_default\":1,\"member_price\":null},\"discount_type\":\"discount\",\"discount_rate\":\"9\",\"reduce_money\":\"6.98\",\"specify_price\":\"62.82\",\"is_enabled\":1,\"index\":1,\"valid\":true,\"discount_price\":\"62.82\",\"sku_list\":[{\"sku_id\":8,\"site_id\":2,\"sku_name\":\"\",\"sku_image\":\"upload/attachment/image/2/202504/03/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg\",\"sku_no\":\"\",\"goods_id\":8,\"sku_spec_format\":\"\",\"price\":\"69.80\",\"market_price\":\"0.00\",\"sale_price\":\"69.80\",\"cost_price\":\"0.00\",\"stock\":10,\"weight\":\"0.000\",\"volume\":\"0.000\",\"sale_num\":0,\"is_default\":1,\"member_price\":null,\"discount_rate\":\"9\",\"reduce_money\":\"6.98\",\"specify_price\":\"62.82\",\"discount_price\":\"62.82\",\"discount_type\":\"discount\",\"is_enabled\":1}]}]', 'discount', '', '', '', '1743609600', '1743955200', 'end', '1743670547', '0', '0.00', '0', '0', '0');

-- -----------------------------
-- Table structure for `mall_active_goods`
-- -----------------------------
DROP TABLE IF EXISTS `mall_active_goods`;
CREATE TABLE `mall_active_goods` (
  `active_goods_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '活动商品id',
  `active_id` int(11) NOT NULL DEFAULT '0' COMMENT '活动id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
  `active_goods_type` varchar(255) NOT NULL DEFAULT '' COMMENT '商品活动类型（单品，独立商品，店铺整体商品）',
  `active_class` varchar(255) NOT NULL DEFAULT '' COMMENT '商品活动类别',
  `active_goods_label` varchar(1000) NOT NULL DEFAULT '' COMMENT '活动商品标签（针对活动有标签）',
  `active_goods_category` varchar(1000) NOT NULL DEFAULT '' COMMENT '活动商品分类（针对活动有分类）',
  `active_goods_value` text COMMENT '活动商品信息数据',
  `active_goods_status` varchar(50) NOT NULL DEFAULT '' COMMENT '活动状态',
  `active_goods_point` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '活动商品积分（展示，搜索）',
  `active_goods_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '活动商品价格（展示，搜索）',
  `active_goods_stock` int(11) NOT NULL DEFAULT '0' COMMENT '活动商品库存（针对参与库存）',
  `active_goods_order_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '活动累计金额',
  `active_goods_order_num` int(11) NOT NULL DEFAULT '0' COMMENT '活动累计订单数',
  `active_goods_member_num` int(11) NOT NULL DEFAULT '0' COMMENT '活动参与会员数',
  `active_goods_success_num` int(11) NOT NULL DEFAULT '0' COMMENT '活动成功参与会员数',
  PRIMARY KEY (`active_goods_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='店铺营销活动';

-- -----------------------------
-- Records of `mall_active_goods`
-- -----------------------------
INSERT INTO `mall_active_goods` VALUES
('1', '1', '2', '7', 'single', 'discount', '', '', '[{\"sku_id\":7,\"site_id\":2,\"sku_name\":\"\",\"sku_image\":\"upload\\/attachment\\/image\\/2\\/202504\\/01\\/1743475733844babe24c1b20be14c53049c43889db_local.png\",\"sku_no\":\"\",\"goods_id\":7,\"sku_spec_format\":\"\",\"price\":\"22.00\",\"market_price\":\"0.00\",\"sale_price\":\"22.00\",\"cost_price\":\"0.00\",\"stock\":50,\"weight\":\"0.000\",\"volume\":\"0.000\",\"sale_num\":0,\"is_default\":1,\"member_price\":null,\"discount_rate\":\"9\",\"reduce_money\":\"2.20\",\"specify_price\":\"19.80\",\"discount_price\":\"19.80\",\"discount_type\":\"discount\",\"is_enabled\":1}]', 'end', '0.00', '19.80', '0', '0.00', '0', '0', '0'),
('2', '1', '2', '8', 'single', 'discount', '', '', '[{\"sku_id\":8,\"site_id\":2,\"sku_name\":\"\",\"sku_image\":\"upload\\/attachment\\/image\\/2\\/202504\\/03\\/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg\",\"sku_no\":\"\",\"goods_id\":8,\"sku_spec_format\":\"\",\"price\":\"69.80\",\"market_price\":\"0.00\",\"sale_price\":\"69.80\",\"cost_price\":\"0.00\",\"stock\":10,\"weight\":\"0.000\",\"volume\":\"0.000\",\"sale_num\":0,\"is_default\":1,\"member_price\":null,\"discount_rate\":\"9\",\"reduce_money\":\"6.98\",\"specify_price\":\"62.82\",\"discount_price\":\"62.82\",\"discount_type\":\"discount\",\"is_enabled\":1}]', 'end', '0.00', '62.82', '0', '0.00', '0', '0', '0');

-- -----------------------------
-- Table structure for `mall_cart`
-- -----------------------------
DROP TABLE IF EXISTS `mall_cart`;
CREATE TABLE `mall_cart` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '购物车表ID',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `member_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  `goods_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
  `sku_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'sku id',
  `num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品数量',
  `market_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '活动类型',
  `market_type_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '活动id',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '购物车商品状态',
  `invalid_remark` varchar(255) NOT NULL DEFAULT '' COMMENT '失效原因',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `goods_id` (`goods_id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `sku_id` (`sku_id`) USING BTREE,
  KEY `type` (`market_type`) USING BTREE,
  KEY `type_id` (`market_type_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='购物车表';


-- -----------------------------
-- Table structure for `mall_coupon`
-- -----------------------------
DROP TABLE IF EXISTS `mall_coupon`;
CREATE TABLE `mall_coupon` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  `start_time` int(11) NOT NULL DEFAULT '0' COMMENT '活动开启时间',
  `end_time` int(11) NOT NULL DEFAULT '0' COMMENT '活动结束时间',
  `remain_count` int(11) NOT NULL DEFAULT '0' COMMENT '剩余数量',
  `receive_count` int(11) NOT NULL DEFAULT '0' COMMENT '已领取数量',
  `limit_count` int(11) NOT NULL DEFAULT '0' COMMENT '单个会员限制领取数量',
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT ' 状态 1 正常 2 未开启 3 已无效',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
  `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '面值',
  `min_condition_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品最低多少金额可用优惠券',
  `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '优惠券类型 1通用优惠券 2商品品类优惠券 3商品优惠券',
  `receive_type` int(11) NOT NULL DEFAULT '0' COMMENT '领取方式',
  `valid_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '有效时间',
  `length` int(11) NOT NULL DEFAULT '0' COMMENT '有效期时长(天)',
  `valid_start_time` int(11) NOT NULL DEFAULT '0' COMMENT '有效期开始时间',
  `valid_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '有效期结束时间',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `receive_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT ' 状态 1 正常 2 关闭',
  `join_site_ids` varchar(1000) NOT NULL DEFAULT '' COMMENT '支持使用的站点',
  `is_all_site_join` int(11) NOT NULL DEFAULT '0' COMMENT '是否支持全部站点',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `title` (`title`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='优惠券表';

-- -----------------------------
-- Records of `mall_coupon`
-- -----------------------------
INSERT INTO `mall_coupon` VALUES
('1', '2', '无门槛5元优惠卷', '1743696000', '1746201600', '-1', '0', '1', '1', '1743670404', '5.00', '0.00', '1', '1', '2', '30', '1743670404', '1746288000', '0', '1', '', '0');

-- -----------------------------
-- Table structure for `mall_coupon_goods`
-- -----------------------------
DROP TABLE IF EXISTS `mall_coupon_goods`;
CREATE TABLE `mall_coupon_goods` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券模板id',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
  `category_id` int(11) NOT NULL DEFAULT '0' COMMENT '分类id',
  `brand_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品品牌id',
  `mall_category_id` int(11) NOT NULL DEFAULT '0' COMMENT '平台分类id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_category_id` (`category_id`) USING BTREE,
  KEY `index_coupon_id` (`coupon_id`) USING BTREE,
  KEY `index_goods_id` (`goods_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='优惠券商品或品类关联表';


-- -----------------------------
-- Table structure for `mall_coupon_member`
-- -----------------------------
DROP TABLE IF EXISTS `mall_coupon_member`;
CREATE TABLE `mall_coupon_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '优惠券发放记录id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券id',
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员id',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '领取时间',
  `expire_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '过期时间',
  `use_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用时间',
  `type` varchar(32) NOT NULL DEFAULT '' COMMENT '优惠券类型',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券名称',
  `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '面值',
  `min_condition_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '最低使用门槛',
  `receive_type` varchar(255) NOT NULL DEFAULT '' COMMENT '领取方式',
  `trade_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联业务id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `coupon_id` (`coupon_id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='优惠券会员领取记录表';


-- -----------------------------
-- Table structure for `mall_delivery_company`
-- -----------------------------
DROP TABLE IF EXISTS `mall_delivery_company`;
CREATE TABLE `mall_delivery_company` (
  `company_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `company_name` varchar(255) NOT NULL DEFAULT '' COMMENT '物流公司名称',
  `logo` varchar(255) NOT NULL DEFAULT '' COMMENT '物流公司logo',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT '物流公司网站',
  `express_no` varchar(255) NOT NULL DEFAULT '' COMMENT '物流公司编号',
  `create_time` int(11) NOT NULL DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`company_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- -----------------------------
-- Records of `mall_delivery_company`
-- -----------------------------
INSERT INTO `mall_delivery_company` VALUES
('1', '0', '圆通速递', 'addon/mall/web/yuantong.png', 'https://www.yto.net.cn/', 'YTO', '1740447853', '1740447853'),
('2', '0', '韵达速递', 'addon/mall/web/yunda.png', 'http://www.yundaex.com', 'YD', '1740447853', '1740447853'),
('3', '0', '中通快递', 'addon/mall/web/zhongtong.png', 'https://www.zto.com', 'ZTO', '1740447853', '1740447853'),
('4', '0', '申通快递', '', 'https://www.sto.cn/', 'STO', '1740447853', '1744162056'),
('5', '0', '顺丰速运', '', '', 'SF', '1740447853', '1740447853'),
('6', '0', '邮政快递包裹', '', '', 'YZPY', '1740447853', '1740447853'),
('7', '0', '京东快递', '', '', 'JD', '1740447853', '1740447853'),
('8', '0', 'EMS', '', '', 'EMS', '1740447853', '1740447853'),
('9', '0', '极兔速递', '', '', 'JTSD', '1740447853', '1740447853'),
('10', '0', '德邦快递', '', '', 'DBL', '1740447853', '1740447853'),
('11', '0', '德邦快运/德邦物流', '', '', 'DBLKY', '1740447853', '1740447853'),
('12', '0', '菜鸟速递', '', '', 'CNSD', '1740447853', '1740447853'),
('13', '0', '菜鸟橙运', '', '', 'CNCY', '1740447853', '1740447853'),
('14', '0', '丹鸟物流', '', '', 'DNWL', '1740447853', '1740447853'),
('15', '0', '宅急送', '', '', 'ZJS', '1740447853', '1740447853'),
('16', '0', '优速快递', '', '', 'UC', '1740447853', '1740447853'),
('17', '0', '圆通快运', '', '', 'YUANTONGKUAIYUN', '1740447853', '1740447853'),
('18', '0', '百世快运', '', '', 'BTWL', '1740447853', '1740447853'),
('19', '0', '顺丰快运', '', '', 'SHUNFENGKUAIYUN', '1740447853', '1740447853'),
('20', '0', '众邮快递', '', '', 'ZYE', '1740447853', '1740447853'),
('21', '0', '中通快运', '', '', 'ZTOKY', '1740447853', '1740447853'),
('22', '0', '安能快运', '', '', 'ANEKY', '1740447853', '1740447853'),
('23', '0', '韵达快运', '', '', 'YDKY', '1740447853', '1740447853'),
('24', '0', '跨越速运', '', '', 'KYSY', '1740447853', '1740447853'),
('25', '0', '顺心捷达', '', '', 'SX', '1740447853', '1740447853'),
('26', '0', '速尔快递', '', '', 'SURE', '1740447853', '1740447853');

-- -----------------------------
-- Table structure for `mall_delivery_shipping_template`
-- -----------------------------
DROP TABLE IF EXISTS `mall_delivery_shipping_template`;
CREATE TABLE `mall_delivery_shipping_template` (
  `template_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `template_name` varchar(50) NOT NULL DEFAULT '' COMMENT '模板名称',
  `fee_type` varchar(20) NOT NULL DEFAULT '' COMMENT '运费计算方式1.重量2体积3按件',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  `is_free_shipping` smallint(6) NOT NULL DEFAULT '0' COMMENT '该区域是否包邮',
  `no_delivery` smallint(6) NOT NULL DEFAULT '0' COMMENT '是否指定该区域不配送',
  PRIMARY KEY (`template_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='运费模板';


-- -----------------------------
-- Table structure for `mall_delivery_shipping_template_item`
-- -----------------------------
DROP TABLE IF EXISTS `mall_delivery_shipping_template_item`;
CREATE TABLE `mall_delivery_shipping_template_item` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `template_id` int(11) NOT NULL DEFAULT '0' COMMENT '模板id',
  `city_id` int(11) NOT NULL DEFAULT '0' COMMENT '市id',
  `snum` int(11) NOT NULL DEFAULT '0' COMMENT '起步计算标准',
  `sprice` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '起步计算价格',
  `xnum` int(11) NOT NULL DEFAULT '0' COMMENT '续步计算标准',
  `xprice` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '续步计算价格',
  `fee_type` varchar(20) NOT NULL DEFAULT '1' COMMENT '运费计算方式',
  `fee_area_ids` text NOT NULL COMMENT '运费设置区域id集',
  `fee_area_names` text NOT NULL COMMENT '运费设置区域名称集',
  `no_delivery` smallint(6) NOT NULL DEFAULT '0' COMMENT '是否指定该区域不配送',
  `no_delivery_area_ids` text NOT NULL COMMENT '不配送的区域id集',
  `no_delivery_area_names` text NOT NULL COMMENT '不配送的区域名称集',
  `is_free_shipping` smallint(6) NOT NULL DEFAULT '0' COMMENT '该区域是否包邮',
  `free_shipping_area_ids` text NOT NULL COMMENT '包邮的区域id集',
  `free_shipping_area_names` text NOT NULL COMMENT '包邮的区域名称集',
  `free_shipping_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '满足包邮的条件',
  `free_shipping_num` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`item_id`) USING BTREE,
  KEY `express_template_item_city_id` (`city_id`) USING BTREE,
  KEY `express_template_item_fee_type` (`fee_type`) USING BTREE,
  KEY `express_template_item_template_id` (`template_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='运费模板细节';


-- -----------------------------
-- Table structure for `mall_goods_attr`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_attr`;
CREATE TABLE `mall_goods_attr` (
  `attr_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0',
  `attr_name` varchar(255) NOT NULL DEFAULT '',
  `attr_value_format` text,
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`attr_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品参数表';


-- -----------------------------
-- Table structure for `mall_goods_brand`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_brand`;
CREATE TABLE `mall_goods_brand` (
  `brand_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '品牌ID',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `brand_name` varchar(100) NOT NULL DEFAULT '' COMMENT '品牌名称',
  `logo` varchar(255) NOT NULL DEFAULT '' COMMENT '品牌logo',
  `desc` text NOT NULL COMMENT '品牌介绍',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`brand_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品品牌表';


-- -----------------------------
-- Table structure for `mall_goods_browse`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_browse`;
CREATE TABLE `mall_goods_browse` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0',
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '浏览人',
  `sku_id` int(11) NOT NULL DEFAULT '0' COMMENT 'sku_id',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
  `browse_time` int(11) NOT NULL DEFAULT '0' COMMENT '浏览时间',
  `goods_cover` varchar(2000) NOT NULL DEFAULT '' COMMENT '商品图片',
  `goods_name` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品浏览历史';

-- -----------------------------
-- Records of `mall_goods_browse`
-- -----------------------------
INSERT INTO `mall_goods_browse` VALUES
('1', '2', '1', '3', '3', '1743563444', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '福临门长粒香大米2.5kg'),
('2', '2', '2', '3', '3', '1744164272', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '福临门长粒香大米2.5kg'),
('3', '2', '2', '4', '4', '1743579197', 'upload/attachment/image/2/202504/02/1743578778454461df95561dfc73997226186186d5_local.jpeg', '【春菜】香椿芽约50g'),
('4', '2', '2', '5', '5', '1743645627', 'upload/attachment/image/2/202504/02/174357902987ec051c5ef6d7168beabd82cada2ed1_local.png', '农家走地鸡750-1000g'),
('5', '3', '2', '10', '10', '1744166079', 'upload/attachment/image/3/202504/03/1743650181515b9fe8bd6a2e9f2a87ba37d9ee5810_local.jpg', 'INS风猫爬架'),
('6', '2', '7', '3', '3', '1744103591', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '福临门长粒香大米2.5kg'),
('7', '2', '14', '3', '3', '1744103897', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '福临门长粒香大米2.5kg'),
('8', '2', '15', '16', '16', '1744104116', 'upload/attachment/image/2/202504/03/17436577352bfa5bf5b85a5377d871b5bdbff375a8_local.jpg', '现摘新鲜蚕豆农家带壳生蚕豆5斤包邮'),
('9', '3', '2', '17', '17', '1744175533', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', '清风抽纸原木纯品3层110抽4连包【1提】'),
('10', '3', '7', '17', '17', '1744164524', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', '清风抽纸原木纯品3层110抽4连包【1提】'),
('11', '3', '16', '17', '17', '1744164686', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', '清风抽纸原木纯品3层110抽4连包【1提】'),
('12', '2', '18', '5', '5', '1744166043', 'upload/attachment/image/2/202504/01/1743475727a407a2f49ce890f22e5d3add0b01ef35_local.png', '农家走地鸡【一只2斤左右】'),
('13', '2', '2', '16', '16', '1744166066', 'upload/attachment/image/2/202504/03/17436577352bfa5bf5b85a5377d871b5bdbff375a8_local.jpg', '现摘新鲜蚕豆农家带壳生蚕豆5斤包邮'),
('14', '2', '2', '15', '15', '1744175948', 'upload/attachment/image/2/202504/03/17436573274643898f95fa14421e38eb02c3d8d3c1_local.jpeg', '重庆长寿血脐橙现摘现发大果5斤装');

-- -----------------------------
-- Table structure for `mall_goods_category`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_category`;
CREATE TABLE `mall_goods_category` (
  `category_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '商品分类id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `category_name` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名称',
  `image` varchar(255) NOT NULL DEFAULT '' COMMENT '分类图片',
  `level` int(11) NOT NULL DEFAULT '0' COMMENT '层级',
  `pid` int(11) NOT NULL DEFAULT '0' COMMENT '上级分类id',
  `category_full_name` varchar(255) NOT NULL DEFAULT '' COMMENT '组装分类名称',
  `is_show` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否显示（1：显示，0：不显示）',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`category_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品分类表';

-- -----------------------------
-- Records of `mall_goods_category`
-- -----------------------------
INSERT INTO `mall_goods_category` VALUES
('3', '0', '秒杀特卖', '', '1', '0', '秒杀特卖', '2', '1', '1743473982', '1743473982'),
('4', '0', '乐家优选', '', '1', '0', '乐家优选', '2', '2', '1743473998', '1743473998'),
('5', '0', '时令好物', '', '1', '0', '时令好物', '2', '3', '1743474010', '1743474010'),
('6', '0', '新鲜蔬菜', '', '1', '0', '新鲜蔬菜', '1', '99', '1743474039', '1743492106'),
('7', '0', '鲜肉蛋禽', '', '1', '0', '鲜肉蛋禽', '1', '98', '1743474057', '1743492114'),
('8', '0', '优选水果', '', '1', '0', '优选水果', '1', '97', '1743474203', '1743492123'),
('9', '0', '海鲜水产', '', '1', '0', '海鲜水产', '1', '96', '1743474214', '1743491333'),
('10', '0', '卤味蔬食', '', '1', '0', '卤味蔬食', '1', '95', '1743474249', '1743491337'),
('11', '0', '生活日用', '', '1', '0', '生活日用', '1', '94', '1743474260', '1743491342'),
('12', '0', '厨房调料', '', '1', '0', '厨房调料', '1', '93', '1743474273', '1743491347'),
('13', '0', '米面粮油', '', '1', '0', '米面粮油', '1', '92', '1743474285', '1743491352'),
('14', '0', '牛奶乳品', '', '1', '0', '牛奶乳品', '1', '91', '1743474295', '1743491358'),
('15', '0', '饮料酒水', '', '1', '0', '饮料酒水', '1', '90', '1743474306', '1743491362'),
('17', '2', '安心果蔬', '', '1', '0', '安心果蔬', '1', '0', '1743475906', '1743579712'),
('18', '0', '新品热销', '', '1', '0', '新品热销', '2', '4', '1743500478', '1743500478'),
('20', '2', '鲜肉蛋禽', '', '1', '0', '鲜肉蛋禽', '1', '0', '1743573543', '1743579957'),
('21', '2', '米面粮油', '', '1', '0', '米面粮油', '1', '0', '1743573611', '1743573611'),
('23', '2', '熟食卤菜', '', '1', '0', '熟食卤菜', '1', '0', '1743580118', '1743580118'),
('24', '3', '生活日用', '', '1', '0', '生活日用', '1', '0', '1743649875', '1743649875'),
('25', '3', '厨房调料', '', '1', '0', '厨房调料', '1', '0', '1743649889', '1743649889'),
('26', '3', '牛奶乳品', '', '1', '0', '牛奶乳品', '1', '0', '1743649897', '1743649897'),
('27', '3', '饮料酒水', '', '1', '0', '饮料酒水', '1', '0', '1743649905', '1743649905'),
('28', '2', '海鲜水产', '', '1', '0', '海鲜水产', '1', '0', '1743652733', '1743652733');

-- -----------------------------
-- Table structure for `mall_goods_evaluate`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_evaluate`;
CREATE TABLE `mall_goods_evaluate` (
  `evaluate_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
  `order_goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单项ID',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员ID',
  `member_head` varchar(255) NOT NULL DEFAULT '' COMMENT '会员头像',
  `member_name` varchar(100) NOT NULL DEFAULT '' COMMENT '会员名称',
  `content` varchar(3000) NOT NULL COMMENT '评价内容',
  `images` varchar(3000) NOT NULL DEFAULT '' COMMENT '评价图片',
  `is_anonymous` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1匿名  2不匿名',
  `scores` tinyint(4) NOT NULL DEFAULT '1' COMMENT '评论分数 1-5',
  `is_audit` tinyint(4) NOT NULL DEFAULT '1' COMMENT '审核状态 1待审 2通过 3拒绝',
  `explain_first` varchar(3000) NOT NULL DEFAULT '' COMMENT '解释内容',
  `topping` int(11) NOT NULL DEFAULT '0' COMMENT '排序 置顶',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '评论时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`evaluate_id`) USING BTREE,
  KEY `idx_mall_goods_evaluate_create_time` (`create_time`) USING BTREE,
  KEY `idx_mall_goods_evaluate_goods_id` (`goods_id`) USING BTREE,
  KEY `idx_mall_goods_evaluate_is_anonymous` (`is_anonymous`) USING BTREE,
  KEY `idx_mall_goods_evaluate_is_audit` (`is_audit`) USING BTREE,
  KEY `idx_mall_goods_evaluate_member_id` (`member_id`) USING BTREE,
  KEY `idx_mall_goods_evaluate_order_id` (`order_id`) USING BTREE,
  KEY `idx_mall_goods_evaluate_scores` (`scores`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品评价表';

-- -----------------------------
-- Records of `mall_goods_evaluate`
-- -----------------------------
INSERT INTO `mall_goods_evaluate` VALUES
('1', '2', '3', '3', '3', '2', '', '183****9229', '米很好吃', '[]', '1', '5', '2', '', '0', '1744077844', '0');

-- -----------------------------
-- Table structure for `mall_goods`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods`;
CREATE TABLE `mall_goods` (
  `goods_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `goods_name` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
  `goods_type` varchar(50) NOT NULL DEFAULT 'real' COMMENT '商品类型',
  `sub_title` varchar(255) NOT NULL DEFAULT '' COMMENT '副标题',
  `goods_cover` varchar(2000) NOT NULL DEFAULT '' COMMENT '商品封面',
  `goods_image` text COMMENT '商品图片',
  `goods_category` varchar(255) NOT NULL DEFAULT '' COMMENT '商品分类',
  `goods_mall_category` int(11) NOT NULL DEFAULT '0' COMMENT '平台分类',
  `goods_desc` text COMMENT '商品介绍',
  `brand_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品品牌id',
  `label_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '标签组',
  `service_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '商品服务',
  `unit` varchar(255) NOT NULL DEFAULT '件' COMMENT '单位',
  `stock` int(11) NOT NULL DEFAULT '0' COMMENT '商品库存（总和）',
  `sale_num` int(11) NOT NULL DEFAULT '0' COMMENT '销量',
  `virtual_sale_num` int(11) NOT NULL DEFAULT '0' COMMENT '虚拟销量',
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '商品状态（1.正常0下架-1待审核-2审核拒绝-3强制下架）',
  `audit_status` int(11) NOT NULL DEFAULT '0' COMMENT '待审核状态（审核之前状态）',
  `audit_reason` varchar(3000) NOT NULL DEFAULT '' COMMENT '审核原因（拒绝或者强制下架）',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `delivery_type` varchar(255) NOT NULL DEFAULT '' COMMENT '支持的配送方式',
  `is_free_shipping` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否免邮',
  `fee_type` varchar(255) NOT NULL DEFAULT '' COMMENT '运费设置，选择模板：template，固定运费：fixed',
  `delivery_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '固定运费',
  `delivery_template_id` int(11) NOT NULL DEFAULT '0' COMMENT '运费模板',
  `mall_attr_id` int(11) NOT NULL DEFAULT '0' COMMENT '平台商品参数id',
  `shop_attr_id` int(11) NOT NULL DEFAULT '0' COMMENT '店铺商品参数id',
  `attr_format` text COMMENT '商品参数内容，json格式',
  `is_discount` int(11) NOT NULL DEFAULT '0' COMMENT '是否参与限时折扣',
  `member_discount` varchar(255) NOT NULL DEFAULT '' COMMENT '会员等级折扣，不参与：空，会员折扣：discount，指定会员价：fixed_price',
  `supplier_id` int(11) NOT NULL DEFAULT '0' COMMENT '供应商id',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  `delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '删除时间',
  `shop_sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品排序',
  `virtual_auto_delivery` tinyint(4) NOT NULL DEFAULT '0' COMMENT '虚拟商品是否自动发货',
  `virtual_receive_type` varchar(255) NOT NULL DEFAULT 'artificial' COMMENT '虚拟商品收货方式，auto：自动收货，artificial：买家确认收货，verify：到店核销',
  `virtual_verify_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '虚拟商品核销有效期类型，0：不限，1：购买后几日有效，2：指定过期日期',
  `virtual_indate` int(11) NOT NULL DEFAULT '0' COMMENT '虚拟到期时间',
  PRIMARY KEY (`goods_id`) USING BTREE,
  KEY `idx_goods_category` (`goods_category`) USING BTREE,
  KEY `idx_goods_create_time` (`create_time`) USING BTREE,
  KEY `idx_goods_delete_time` (`delete_time`) USING BTREE,
  KEY `idx_goods_name` (`goods_name`) USING BTREE,
  KEY `idx_goods_sort` (`sort`) USING BTREE,
  KEY `idx_goods_status` (`status`) USING BTREE,
  KEY `idx_goods_sub_title` (`sub_title`) USING BTREE,
  KEY `IDX_ns_goods_goods_class` (`goods_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品表';

-- -----------------------------
-- Records of `mall_goods`
-- -----------------------------
INSERT INTO `mall_goods` VALUES
('1', '2', '农家草鸡蛋', 'real', '', 'upload/attachment/image/2/202503/31/1743406294d62dce452be64789ade64be3b4f84500_local.jpg', 'upload/attachment/image/2/202503/31/1743406294d62dce452be64789ade64be3b4f84500_local.jpg', '[\"2\"]', '1', '<p>333</p>', '0', '[\"1\"]', '[]', 'g', '1000', '0', '1', '0', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743406349', '1743473836', '1743473836', '1', '0', 'artificial', '0', '0'),
('2', '2', '大米', 'real', '', 'upload/attachment/image/2/202503/31/1743406384618baa72d08dc3a9ae60c7fde3144012_local.jpg', 'upload/attachment/image/2/202503/31/1743406384618baa72d08dc3a9ae60c7fde3144012_local.jpg', '[\"2\"]', '1', '<p>555</p>', '0', '[\"1\"]', '[]', 'g', '10000', '0', '11', '0', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743406424', '1743473834', '1743473834', '2', '0', 'artificial', '0', '0'),
('3', '2', '福临门长粒香大米2.5kg', 'real', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '[\"21\"]', '13', '<p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/1743476912a166c442d97f88e8523f3cb458a05514_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/17434769123760c98ce25e30558780cb1cd136be70_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/1743476912a539d31e2a8aa6f8ed5beaa3faa09ffc_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/174347691228a1eab280a92f43e948cb4066a3f6e7_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/1743476912a905dacbb46633c5b4a6e586142cc094_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/17434769128eccddcad4c7db26cb0b4c3bc65f42da_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/17434769131717d90b626930bbd7be7afa85a311c4_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/17434769120729e58778b17e0fa593961f3c12f0a8_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/17434769120296a85c8a256d096b377fc37bc55310_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/17434769137878821efccc4d7c4a3beabb2ad9d8b6_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/1743476913e803735486fe776547f08e681e69c7eb_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/1743476912c23f8698759c490111efb56452e08064_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/1743476912d97e557d21880a66c35c493a4593cdb9_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/01/1743476913732c8284ce4ab7da169804f0de0e6a42_local.jpg\"/></p><p><br/></p>', '0', '[]', '[]', '袋', '95', '5', '20', '1', '1', '', '0', '[]', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743476877', '1744089708', '0', '1', '0', 'artificial', '0', '0'),
('4', '2', '【春菜】香椿芽约50g', 'real', '', 'upload/attachment/image/2/202504/02/1743578778454461df95561dfc73997226186186d5_local.jpeg', 'upload/attachment/image/2/202504/02/1743578778454461df95561dfc73997226186186d5_local.jpeg', '[\"17\"]', '5', '<p>商品图片仅供参考，请以实物为准</p>', '0', '[]', '[]', 'kg', '25', '0', '0', '1', '1', '', '0', '[]', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743578899', '1743657483', '0', '0', '0', 'artificial', '0', '0'),
('5', '2', '农家走地鸡【一只2斤左右】', 'real', '当日宰杀非冻货', 'upload/attachment/image/2/202504/01/1743475727a407a2f49ce890f22e5d3add0b01ef35_local.png', 'upload/attachment/image/2/202504/01/1743475727a407a2f49ce890f22e5d3add0b01ef35_local.png', '[\"20\"]', '7', '<p>商品图片仅供参考，请以实物为准</p>', '0', '[]', '[]', '只', '50', '0', '0', '1', '1', '', '0', '[]', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743579109', '1743579448', '0', '0', '0', 'artificial', '0', '0'),
('6', '2', '泰国金枕榴莲一箱约5斤', 'real', '', 'upload/attachment/image/2/202504/02/1743579618d679eb05365a4f562844acc28f384e7a_local.jpeg', 'upload/attachment/image/2/202504/02/1743579618d679eb05365a4f562844acc28f384e7a_local.jpeg', '[\"17\"]', '8', '<p>图片仅供参考，请以实物为准</p>', '0', '[]', '[]', '箱', '20', '0', '5', '1', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743579827', '1743579827', '0', '0', '0', 'artificial', '0', '0'),
('7', '2', '农家饲养猪前槽肉500g', 'real', '', 'upload/attachment/image/2/202504/01/1743475733844babe24c1b20be14c53049c43889db_local.png', 'upload/attachment/image/2/202504/01/1743475733844babe24c1b20be14c53049c43889db_local.png', '[\"20\"]', '18', '<p>商品图片仅供参考，请以实物为准</p>', '0', '[]', '[]', 'kg', '50', '0', '5', '1', '1', '', '0', '[]', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743580022', '1743657793', '0', '0', '0', 'artificial', '0', '0'),
('8', '2', '荣昌正宗小罗卤鹅3斤装', 'real', '', 'upload/attachment/image/2/202504/03/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg', 'upload/attachment/image/2/202504/03/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg', '[\"23\"]', '10', '<p>包邮，当日真空包装发出，带酱料包。</p><p>商品图片仅供参考，请以实物为准。</p>', '0', '[]', '[]', '只', '10', '0', '2', '1', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743647754', '1743647754', '0', '0', '0', 'artificial', '0', '0'),
('9', '2', '福临门浓香压榨一级花生油4L家庭食用油中粮出品新老包装随机发货', 'real', '', 'upload/attachment/image/2/202504/03/174364887765325eee5b6274d0cb70d68d981e71af_local.png', 'upload/attachment/image/2/202504/03/174364887765325eee5b6274d0cb70d68d981e71af_local.png', '[\"21\"]', '13', '<p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/1743648862e10e69bd18536bd6b95ad6d888d7fcbe_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/17436488624368ae5ad83cf5ff74d8943069b66991_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/174364886293f65eb719d1a833109b2c03ccdf55c7_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/174364886257c3b57a9f3f90155e87b0a47e7581da_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/1743648862ec444005bfce64f2e2ef8c4b61f6ac53_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/174364886291a0a5e91da511b4b28f419a21a3c8a7_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/17436488626c535622717d49e29cbf38561e249e4e_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/17436488624fc442de9a9d09f049ffbb16ecb2e360_local.jpg\"/></p>', '0', '[]', '[]', '桶', '8', '0', '5', '1', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743648910', '1743648910', '0', '0', '0', 'artificial', '0', '0'),
('10', '3', 'INS风猫爬架', 'real', '', 'upload/attachment/image/3/202504/03/1743650181515b9fe8bd6a2e9f2a87ba37d9ee5810_local.jpg', 'upload/attachment/image/3/202504/03/1743650181515b9fe8bd6a2e9f2a87ba37d9ee5810_local.jpg', '[\"24\"]', '4', '<p>商品图片仅供参考，实际请以实物为准。</p>', '0', '[]', '[]', '件', '5', '0', '1', '1', '1', '', '0', '[]', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743650241', '1743657826', '0', '0', '0', 'artificial', '0', '0'),
('11', '3', '安记块状咖喱原味调味料1度微辣100g*4盒料理包', 'real', '', 'upload/attachment/image/3/202504/03/17436511494696787643777738d29770c8555b6247_local.jpg', 'upload/attachment/image/3/202504/03/17436511494696787643777738d29770c8555b6247_local.jpg', '[\"25\"]', '12', '<p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/17436512753ece3c5ee7fb4f0cf49528fa38879b40_local.jpg\"/></p>', '0', '[]', '[]', '盒', '5', '0', '0', '1', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743651289', '1743651289', '0', '0', '0', 'artificial', '0', '0'),
('12', '3', '蒙牛特仑苏有机纯牛奶 250ml*12盒', 'real', '', 'upload/attachment/image/3/202504/03/1743651895aedf9c6512175696880079732636c2a8_local.jpeg', 'upload/attachment/image/3/202504/03/1743651895aedf9c6512175696880079732636c2a8_local.jpeg', '[\"26\"]', '14', '<p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/17436517127a0fef33ff1b83e2e8b40ad1cc1067ed_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/17436517129cee588fe770376a64b0bdb51f2a3862_local.jpg\"/></p><p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/1743651880a5790794921983cc4b76303983c82d19_local.jpg\"/></p>', '0', '[]', '[]', '件', '5', '0', '2', '1', '1', '', '0', '[]', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743651717', '1743651969', '0', '0', '0', 'artificial', '0', '0'),
('13', '3', '格鲁吉亚红酒维尔兹阿拉扎尼半甜原装原瓶进口男女士热微醺葡萄酒', 'real', '', 'upload/attachment/image/3/202504/03/17436526585a9f2d714cb61b58bc874ab8cc4c8d59_local.jpg', 'upload/attachment/image/3/202504/03/17436526585a9f2d714cb61b58bc874ab8cc4c8d59_local.jpg', '[\"27\"]', '15', '<p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/17436524730457b1fbee0c49df017402c10dd5ba80_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/17436524734632bc37d9cc6d88324cf271502c2492_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/1743652473c4b337eaac84f6d8da6b464ab384e050_local.jpg\"/></p>', '0', '[]', '[]', '瓶', '10', '0', '2', '1', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743652666', '1743652666', '0', '0', '0', 'artificial', '0', '0'),
('14', '2', '秋刀鱼冷冻新鲜商用日式料理特大号烧烤海鲜水产鲜活深海鱼4斤装', 'real', '', 'upload/attachment/image/2/202504/03/174365688616be76026fc9fc10d8e73352c8c33abf_local.png', 'upload/attachment/image/2/202504/03/174365688616be76026fc9fc10d8e73352c8c33abf_local.png', '[\"28\"]', '9', '<p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/1743656902060aeb2bb89bcc4e6dee5b17fcc59711_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/1743656902fa6922870e1d43b81f6f5aabcc2710a7_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/1743656902ebff0898c30b875f3ac3544f4a480570_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/17436569022cdbf48bb281dd0f616b45454d2327b5_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/174365690288867f6dea06ed056ed4fa914b75ddeb_local.jpg\"/></p>', '0', '[]', '[]', '份', '5', '0', '1', '1', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743656981', '1743656981', '0', '0', '0', 'artificial', '0', '0'),
('15', '2', '重庆长寿血脐橙现摘现发大果5斤装', 'real', '', 'upload/attachment/image/2/202504/03/17436573274643898f95fa14421e38eb02c3d8d3c1_local.jpeg', 'upload/attachment/image/2/202504/03/17436573274643898f95fa14421e38eb02c3d8d3c1_local.jpeg', '[\"17\"]', '3', '<p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/17436573425a3613854991878ace10295badfe42d4_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/174365734326ba54f8c5f00c05e6db6b96c525f20b_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/2/202504/03/174365734352f87e18f3b8b71c1d2d0b77cd1405bb_local.jpg\"/></p>', '0', '[]', '[]', '件', '10', '0', '0', '1', '1', '', '0', '[]', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743657358', '1743657372', '0', '0', '0', 'artificial', '0', '0'),
('16', '2', '现摘新鲜蚕豆农家带壳生蚕豆5斤包邮', 'real', '', 'upload/attachment/image/2/202504/03/17436577352bfa5bf5b85a5377d871b5bdbff375a8_local.jpg', 'upload/attachment/image/2/202504/03/17436577352bfa5bf5b85a5377d871b5bdbff375a8_local.jpg', '[\"17\"]', '6', '<p>商品图片仅供参考，实际请以实物为准。</p>', '0', '[]', '[]', '斤', '100', '0', '10', '1', '1', '', '0', '', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743657749', '1743657749', '0', '0', '0', 'artificial', '0', '0'),
('17', '3', '清风抽纸原木纯品3层110抽4连包【1提】', 'real', '', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', '[\"24\"]', '11', '<p><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/174365844243c39fca11912e2bad0d22f1d8da738f_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/1743658442e82ed12fc61c7deaecadda5128896bea_local.png\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/1743658442efe8b4bb97068fc451697ddcbd7b499f_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/1743658442c299dc38487c9d366a6b94d20602d393_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/17436584427949dce8615c351c84579737594f7ed0_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/1743658442fee1498193907b9b8125b69087bf0b6a_local.jpg\"/><img src=\"https://ljhshop.bszfrobot.com/upload/attachment/image/3/202504/03/174365844237344be7fa35ae54779d734ef1d6f698_local.jpg\"/></p>', '0', '[]', '[]', '件', '17', '3', '25', '1', '1', '', '0', '[]', '1', 'template', '0.00', '0', '0', '0', '[]', '0', '', '0', '1743658182', '1744164336', '0', '0', '0', 'artificial', '0', '0');

-- -----------------------------
-- Table structure for `mall_goods_collect`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_collect`;
CREATE TABLE `mall_goods_collect` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员id',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '收藏时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `IDX_member_collect_goods` (`goods_id`) USING BTREE,
  KEY `IDX_member_collect_member` (`member_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品收藏记录表';


-- -----------------------------
-- Table structure for `mall_goods_sku`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_sku`;
CREATE TABLE `mall_goods_sku` (
  `sku_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品sku_id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `sku_name` varchar(255) NOT NULL DEFAULT '' COMMENT '商品sku名称',
  `sku_image` varchar(2000) NOT NULL DEFAULT '' COMMENT 'sku主图',
  `sku_no` varchar(255) NOT NULL DEFAULT '' COMMENT '商品sku编码',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
  `sku_spec_format` text COMMENT 'sku规格格式',
  `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'sku单价',
  `market_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '划线价',
  `sale_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '实际卖价（有活动显示活动价，默认原价）',
  `cost_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'sku成本价',
  `stock` int(11) NOT NULL DEFAULT '0' COMMENT '商品sku库存',
  `weight` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT '重量（单位kg）',
  `volume` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT '体积（单位立方米）',
  `sale_num` int(11) NOT NULL DEFAULT '0' COMMENT '销量',
  `is_default` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否默认',
  `member_price` text COMMENT '会员价，json格式，指定会员价，数据结构为：{"level_1":"10.00","level_2":"10.00"}',
  PRIMARY KEY (`sku_id`) USING BTREE,
  KEY `idx_goods_sku_is_default` (`is_default`) USING BTREE,
  KEY `idx_goods_sku_price` (`price`) USING BTREE,
  KEY `idx_goods_sku_sale_price` (`sale_price`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品规格表';

-- -----------------------------
-- Records of `mall_goods_sku`
-- -----------------------------
INSERT INTO `mall_goods_sku` VALUES
('1', '2', '', 'upload/attachment/image/2/202503/31/1743406294d62dce452be64789ade64be3b4f84500_local.jpg', '', '1', '', '9.90', '10.00', '9.90', '9.00', '1000', '1.000', '0.000', '0', '1', ''),
('2', '2', '', 'upload/attachment/image/2/202503/31/1743406384618baa72d08dc3a9ae60c7fde3144012_local.jpg', '', '2', '', '89.00', '80.00', '89.00', '50.00', '10000', '50.000', '0.000', '0', '1', ''),
('3', '2', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '', '3', '', '0.30', '29.90', '0.30', '0.00', '95', '2.500', '0.000', '5', '1', ''),
('4', '2', '', 'upload/attachment/image/2/202504/02/1743578778454461df95561dfc73997226186186d5_local.jpeg', '', '4', '', '6.50', '0.00', '6.50', '0.00', '25', '0.000', '0.000', '0', '1', ''),
('5', '2', '', 'upload/attachment/image/2/202504/01/1743475727a407a2f49ce890f22e5d3add0b01ef35_local.png', '', '5', '', '60.00', '0.00', '60.00', '0.00', '50', '0.000', '0.000', '0', '1', ''),
('6', '2', '', 'upload/attachment/image/2/202504/02/1743579618d679eb05365a4f562844acc28f384e7a_local.jpeg', '', '6', '', '188.00', '238.00', '188.00', '0.00', '20', '0.000', '0.000', '0', '1', ''),
('7', '2', '', 'upload/attachment/image/2/202504/01/1743475733844babe24c1b20be14c53049c43889db_local.png', '', '7', '', '22.00', '0.00', '22.00', '0.00', '50', '0.000', '0.000', '0', '1', ''),
('8', '2', '', 'upload/attachment/image/2/202504/03/1743647623d1f10d97c4ba83f7dd49994176015bd9_local.jpeg', '', '8', '', '69.80', '0.00', '69.80', '0.00', '10', '0.000', '0.000', '0', '1', ''),
('9', '2', '', 'upload/attachment/image/2/202504/03/174364887765325eee5b6274d0cb70d68d981e71af_local.png', '', '9', '', '79.90', '89.90', '79.90', '0.00', '8', '0.000', '0.000', '0', '1', ''),
('10', '3', '', 'upload/attachment/image/3/202504/03/1743650181515b9fe8bd6a2e9f2a87ba37d9ee5810_local.jpg', '', '10', '', '88.00', '0.00', '88.00', '0.00', '5', '0.000', '0.000', '0', '1', ''),
('11', '3', '', 'upload/attachment/image/3/202504/03/17436511494696787643777738d29770c8555b6247_local.jpg', '', '11', '', '46.00', '0.00', '46.00', '0.00', '5', '0.000', '0.000', '0', '1', ''),
('12', '3', '', 'upload/attachment/image/3/202504/03/1743651895aedf9c6512175696880079732636c2a8_local.jpeg', '', '12', '', '50.00', '0.00', '50.00', '0.00', '5', '0.000', '0.000', '0', '1', ''),
('13', '3', '', 'upload/attachment/image/3/202504/03/17436526585a9f2d714cb61b58bc874ab8cc4c8d59_local.jpg', '', '13', '', '100.00', '0.00', '100.00', '0.00', '10', '0.000', '0.000', '0', '1', ''),
('14', '2', '', 'upload/attachment/image/2/202504/03/174365688616be76026fc9fc10d8e73352c8c33abf_local.png', '', '14', '', '39.80', '49.80', '39.80', '0.00', '5', '0.000', '0.000', '0', '1', ''),
('15', '2', '', 'upload/attachment/image/2/202504/03/17436573274643898f95fa14421e38eb02c3d8d3c1_local.jpeg', '', '15', '', '39.90', '0.00', '39.90', '0.00', '10', '0.000', '0.000', '0', '1', ''),
('16', '2', '', 'upload/attachment/image/2/202504/03/17436577352bfa5bf5b85a5377d871b5bdbff375a8_local.jpg', '', '16', '', '6.89', '0.00', '6.89', '0.00', '100', '0.000', '0.000', '0', '1', ''),
('17', '3', '', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', '', '17', '', '0.01', '0.00', '0.01', '0.00', '17', '0.000', '0.000', '3', '1', '');

-- -----------------------------
-- Table structure for `mall_goods_spec`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_spec`;
CREATE TABLE `mall_goods_spec` (
  `spec_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '规格id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联商品id',
  `spec_name` varchar(255) NOT NULL DEFAULT '' COMMENT '规格项名称',
  `spec_values` text COMMENT '规格值名称，多个逗号隔开',
  PRIMARY KEY (`spec_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品规格项/值表';


-- -----------------------------
-- Table structure for `mall_goods_label`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_label`;
CREATE TABLE `mall_goods_label` (
  `label_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '标签ID',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `label_name` varchar(255) NOT NULL DEFAULT '' COMMENT '标签名称',
  `memo` varchar(255) NOT NULL DEFAULT '' COMMENT '标签说明',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`label_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品标签表';

-- -----------------------------
-- Records of `mall_goods_label`
-- -----------------------------
INSERT INTO `mall_goods_label` VALUES
('1', '0', '新品', '', '1', '1740447853', '1740447853'),
('2', '0', '618', '', '2', '1740447853', '1740447853'),
('3', '0', '双十一', '', '3', '1740447853', '1740447853'),
('4', '0', '年货节', '', '4', '1740447853', '1740447853');

-- -----------------------------
-- Table structure for `mall_goods_service`
-- -----------------------------
DROP TABLE IF EXISTS `mall_goods_service`;
CREATE TABLE `mall_goods_service` (
  `service_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `service_name` varchar(255) NOT NULL DEFAULT '' COMMENT '服务名称',
  `image` varchar(255) NOT NULL DEFAULT '' COMMENT '图片',
  `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '描述',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`service_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品服务表';

-- -----------------------------
-- Records of `mall_goods_service`
-- -----------------------------
INSERT INTO `mall_goods_service` VALUES
('1', '0', '天天低价 畅选无忧', 'addon/mall/web/footer-01.png', '', '1740447853', '1740447853'),
('2', '0', '正品行货 精致服务', 'addon/mall/web/footer-02.png', '', '1740447853', '1740447853'),
('3', '0', '天天低价 畅选无忧', 'addon/mall/web/footer-03.png', '', '1740447853', '1740447853'),
('4', '0', '品类齐全 轻松购物', 'addon/mall/web/footer-04.png', '', '1740447853', '1740447853');

-- -----------------------------
-- Table structure for `mall_invoice`
-- -----------------------------
DROP TABLE IF EXISTS `mall_invoice`;
CREATE TABLE `mall_invoice` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员id',
  `trade_type` varchar(10) NOT NULL DEFAULT 'order' COMMENT '开票分类 order:订单',
  `trade_id` int(11) NOT NULL DEFAULT '0' COMMENT '业务id',
  `header_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '抬头类型',
  `header_name` varchar(1000) NOT NULL DEFAULT '' COMMENT '名称（发票抬头）',
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '发票类型',
  `name` varchar(1000) NOT NULL DEFAULT '' COMMENT '发票内容',
  `tax_number` varchar(50) NOT NULL DEFAULT '' COMMENT '公司税号',
  `mobile` varchar(30) NOT NULL DEFAULT '' COMMENT '开票人手机号',
  `email` varchar(100) NOT NULL DEFAULT '' COMMENT '开票人邮箱',
  `telephone` varchar(30) NOT NULL DEFAULT '' COMMENT '注册电话',
  `address` varchar(1000) NOT NULL DEFAULT '' COMMENT '注册地址',
  `bank_name` varchar(1000) NOT NULL DEFAULT '' COMMENT '开户银行',
  `bank_card_number` varchar(1000) NOT NULL DEFAULT '' COMMENT '银行账号',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '开票金额',
  `is_invoice` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开票',
  `invoice_number` varchar(50) NOT NULL DEFAULT '' COMMENT '发票代码',
  `invoice_voucher` varchar(1000) NOT NULL DEFAULT '' COMMENT '发票凭证',
  `remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '申请时间',
  `invoice_time` int(11) NOT NULL DEFAULT '0' COMMENT '开票时间',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '是否生效',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='发票表';


-- -----------------------------
-- Table structure for `mall_order`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order`;
CREATE TABLE `mall_order` (
  `order_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `site_name` varchar(255) NOT NULL DEFAULT '' COMMENT '店铺（站点）名称',
  `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单组id',
  `order_no` varchar(50) NOT NULL DEFAULT '' COMMENT '订单编号',
  `body` varchar(1000) NOT NULL DEFAULT '' COMMENT '订单内容',
  `order_type` varchar(55) NOT NULL DEFAULT '' COMMENT '订单类型',
  `order_from` varchar(55) NOT NULL DEFAULT '' COMMENT '订单来源',
  `out_trade_no` varchar(50) NOT NULL DEFAULT '' COMMENT '支付流水号',
  `status` varchar(55) NOT NULL DEFAULT '' COMMENT '订单状态',
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员id',
  `ip` varchar(20) NOT NULL DEFAULT '' COMMENT 'ip',
  `goods_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品金额',
  `delivery_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '配送金额',
  `discount_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
  `mall_discount_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台优惠金额',
  `order_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单金额',
  `invoice_id` int(11) NOT NULL DEFAULT '0' COMMENT '发票id，0表示不开发票',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `pay_time` int(11) NOT NULL DEFAULT '0' COMMENT '订单支付时间',
  `delivery_time` int(11) NOT NULL DEFAULT '0' COMMENT '订单发货时间',
  `take_time` int(11) NOT NULL DEFAULT '0' COMMENT '订单收货时间',
  `finish_time` int(11) NOT NULL DEFAULT '0' COMMENT '订单完成时间',
  `close_time` int(11) NOT NULL DEFAULT '0' COMMENT '订单关闭时间',
  `delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '是否删除(针对后台)',
  `timeout` int(11) NOT NULL DEFAULT '0' COMMENT '通用业务超时时间记录',
  `delivery_type` varchar(255) NOT NULL DEFAULT '' COMMENT '配送方式',
  `take_store_id` int(11) NOT NULL DEFAULT '0' COMMENT '自提点',
  `taker_name` varchar(500) NOT NULL DEFAULT '' COMMENT '收货人',
  `taker_mobile` varchar(50) NOT NULL DEFAULT '' COMMENT '收货人手机号',
  `taker_province` int(11) NOT NULL DEFAULT '0' COMMENT '收货省',
  `taker_city` int(11) NOT NULL DEFAULT '0' COMMENT '收货市',
  `taker_district` int(11) NOT NULL DEFAULT '0' COMMENT '收货区县',
  `taker_address` varchar(1000) NOT NULL DEFAULT '' COMMENT '收货地址',
  `taker_full_address` varchar(1000) NOT NULL DEFAULT '' COMMENT '收货详细地址',
  `taker_longitude` varchar(50) NOT NULL DEFAULT '' COMMENT '收货地址经度',
  `taker_latitude` varchar(50) NOT NULL DEFAULT '' COMMENT '收货详细纬度',
  `taker_store_id` varchar(50) NOT NULL DEFAULT '' COMMENT '收货门店',
  `is_enable_refund` int(11) NOT NULL DEFAULT '0' COMMENT '是否允许退款',
  `member_remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '会员留言信息',
  `shop_remark` varchar(2000) NOT NULL DEFAULT '' COMMENT '商家留言',
  `close_remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '关闭原因',
  `close_type` varchar(255) NOT NULL DEFAULT '' COMMENT '关闭来源(未支付自动关闭   手动关闭  退款关闭)',
  `refund_status` int(11) NOT NULL DEFAULT '1' COMMENT '退款状态  1不存在退款  2 部分退款  3 全部退款',
  `has_goods_types` varchar(255) NOT NULL DEFAULT '' COMMENT '包含的商品类型 json',
  `is_evaluate` int(11) NOT NULL DEFAULT '0' COMMENT '是否评论',
  `mall_remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '卖家留言',
  `mall_rate` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台分成比率',
  `refund_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '累计退款金额',
  `shop_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '店铺结算金额',
  `mall_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台结算金额',
  `shop_refund_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '店铺退款结算金额',
  `mall_refund_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台退款结算金额',
  `mall_coupon_money` decimal(10,2) DEFAULT '0.00' COMMENT '平台优惠券补贴',
  `mall_refund_coupon_money` decimal(10,2) DEFAULT '0.00' COMMENT '返还平台优惠券补贴',
  PRIMARY KEY (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单表';

-- -----------------------------
-- Records of `mall_order`
-- -----------------------------
INSERT INTO `mall_order` VALUES
('1', '2', '', '1', '20250402549291095179264', '福临门长粒香大米2.5kg', 'mall', 'weapp', '', '-1', '1', '59.36.121.181', '29.90', '0.00', '0.00', '0.00', '29.90', '0', '1743563471', '0', '0', '0', '0', '0', '0', '0', 'express', '0', 'd e', '13416472917', '110000', '110100', '110101', '12', '北京市北京市东城区12', '', '', '', '0', '', '', '', 'auto_close', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
('2', '2', '', '0', '20250402549324922744832', '福临门长粒香大米2.5kg', 'mall', 'weapp', '', '-1', '2', '106.92.195.24', '0.01', '0.00', '0.00', '0.00', '0.01', '0', '1743571729', '0', '0', '0', '0', '0', '0', '0', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '0', '', '', '', 'shop_close', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
('3', '2', '', '5', '20250402549325287870464', '福临门长粒香大米2.5kg', 'mall', 'weapp', '20250402549336483880960', '5', '2', '106.92.195.24', '0.01', '0.00', '0.00', '0.00', '0.01', '0', '1743571819', '1743574566', '1744076990', '0', '1744077823', '0', '0', '0', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '0', '', '', '', '', '1', '[\"real\"]', '1', '', '0.00', '0.00', '0.01', '0.00', '0.00', '0.00', '0.00', '0.00'),
('4', '2', '', '6', '20250408551421604855808', '福临门长粒香大米2.5kg', 'mall', 'weapp', '20250408551421605535744', '-1', '2', '106.92.141.141', '0.03', '0.00', '0.00', '0.00', '0.03', '0', '1744083615', '1744083635', '1744083713', '0', '0', '0', '0', '0', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '0', '', '', '', 'refund_close', '1', '[\"real\"]', '0', '', '50.00', '0.03', '0.02', '0.02', '0.01', '0.02', '0.00', '0.00'),
('5', '2', '', '7', '20250408551424821829632', '福临门长粒香大米2.5kg', 'mall', 'weapp', '20250408551424822448128', '5', '2', '106.92.141.141', '0.03', '0.00', '0.00', '0.00', '0.03', '0', '1744084400', '1744084417', '1744084691', '0', '1744084717', '0', '0', '0', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '0', '', '', '', '', '1', '[\"real\"]', '0', '', '50.00', '0.00', '0.02', '0.02', '0.00', '0.00', '0.00', '0.00'),
('6', '2', '', '8', '20250408551446650552320', '福临门长粒香大米2.5kg', 'mall', 'weapp', '20250408551446651097088', '5', '2', '106.92.141.141', '0.30', '0.00', '0.00', '0.00', '0.30', '0', '1744089729', '1744089752', '1744090001', '0', '1744090013', '0', '0', '0', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '0', '', '', '', '', '1', '[\"real\"]', '0', '', '50.00', '0.00', '0.15', '0.15', '0.00', '0.00', '0.00', '0.00'),
('7', '2', '', '9', '20250408551485841981440', '福临门长粒香大米2.5kg', 'mall', 'weapp', '20250408551485842518016', '3', '2', '106.92.141.141', '0.30', '0.00', '0.00', '0.00', '0.30', '0', '1744099298', '1744099315', '1744099448', '0', '0', '0', '0', '1745309048', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '1', '', '', '', '', '1', '[\"real\"]', '0', '', '50.00', '0.00', '0.15', '0.15', '0.00', '0.00', '0.00', '0.00'),
('8', '2', '', '12', '20250408551501302128640', '福临门长粒香大米2.5kg', 'mall', 'weapp', '', '-1', '7', '117.136.30.127', '0.30', '0.00', '0.00', '0.00', '0.30', '0', '1744103072', '0', '0', '0', '0', '0', '0', '0', 'express', '0', '杨女士', '18328329229', '500000', '500100', '500107', '九龙坡区石杨路(雨林商都)', '重庆市重庆市九龙坡区九龙坡区石杨路(雨林商都)', '106.482506', '29.529644', '', '0', '', '', '', 'auto_close', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
('9', '2', '', '13', '20250408551503442608128', '福临门长粒香大米2.5kg', 'mall', 'weapp', '', '-1', '7', '117.136.30.127', '0.30', '0.00', '0.00', '0.00', '0.30', '0', '1744103595', '0', '0', '0', '0', '0', '0', '0', 'express', '0', '杨女士', '18328329229', '500000', '500100', '500107', '九龙坡区石杨路(雨林商都)', '重庆市重庆市九龙坡区九龙坡区石杨路(雨林商都)', '106.482506', '29.529644', '', '0', '', '', '', 'auto_close', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
('10', '2', '', '14', '20250408551504456568832', '福临门长粒香大米2.5kg', 'mall', 'weapp', '', '-1', '2', '117.136.30.127', '0.30', '0.00', '0.00', '0.00', '0.30', '0', '1744103842', '0', '0', '0', '0', '0', '0', '0', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '0', '', '', '', 'auto_close', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
('11', '2', '', '16', '20250408551504812396544', '福临门长粒香大米2.5kg', 'mall', 'weapp', '', '-1', '14', '106.92.141.141', '0.30', '0.00', '0.00', '0.00', '0.30', '0', '1744103929', '0', '0', '0', '0', '0', '0', '0', 'express', '0', '江星', '13193062517', '500000', '500100', '500107', '九龙坡区石桥铺雨林商都(石杨路南)', '重庆市重庆市九龙坡区九龙坡区石桥铺雨林商都(石杨路南)', '106.482315', '29.529648', '', '0', '', '', '', 'auto_close', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
('12', '2', '', '17', '20250408551505660276736', '现摘新鲜蚕豆农家带壳生蚕豆5斤包邮', 'mall', 'weapp', '', '-1', '15', '117.187.198.70', '6.89', '0.00', '0.00', '0.00', '6.89', '0', '1744104136', '0', '0', '0', '0', '0', '0', '0', 'express', '0', '才VV', '13984610888', '130000', '130200', '130204', '发v宝宝', '河北省唐山市古冶区发v宝宝', '', '', '', '0', '', '', '', 'auto_close', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
('13', '2', '', '18', '20250408551508856119296', '福临门长粒香大米2.5kg', 'mall', 'weapp', '20250408551508856655872', '3', '2', '106.92.141.141', '0.30', '0.00', '0.00', '0.00', '0.30', '0', '1744104916', '1744104931', '1744104986', '0', '0', '0', '0', '1745314586', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '1', '', '', '', '', '1', '[\"real\"]', '0', '', '50.00', '0.00', '0.15', '0.15', '0.00', '0.00', '0.00', '0.00'),
('14', '3', '', '22', '20250409551752367910912', '清风抽纸原木纯品3层110抽4连包【1提】', 'mall', 'weapp', '20250409551756404051968', '5', '2', '106.92.141.141', '0.01', '0.00', '0.00', '0.00', '0.01', '0', '1744164367', '1744165362', '1744168703', '0', '1744171090', '0', '0', '0', 'express', '0', '杨阳', '18328329229', '500000', '500100', '500106', '重庆沙坪坝三峡广场', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场', '', '', '', '0', '', '', '', '', '1', '[\"real\"]', '0', '', '50.00', '0.00', '0.01', '0.01', '0.00', '0.00', '0.00', '0.00'),
('15', '3', '', '20', '20250409551753039155200', '清风抽纸原木纯品3层110抽4连包【1提】', 'mall', 'weapp', '', '1', '7', '106.92.141.141', '0.01', '0.00', '0.00', '0.00', '0.01', '0', '1744164531', '0', '0', '0', '0', '0', '0', '1744200531', 'express', '0', '杨女士', '18328329229', '500000', '500100', '500107', '九龙坡区石杨路(雨林商都)', '重庆市重庆市九龙坡区九龙坡区石杨路(雨林商都)', '106.482506', '29.529644', '', '0', '', '', '', '', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
('16', '3', '', '21', '20250409551753690730496', '清风抽纸原木纯品3层110抽4连包【1提】', 'mall', 'weapp', '', '1', '16', '106.92.141.141', '0.01', '0.00', '0.00', '0.00', '0.01', '0', '1744164690', '0', '0', '0', '0', '0', '0', '1744200690', 'express', '0', '杨女士', '13983462081', '500000', '500100', '500107', '九龙坡区石桥铺雨林商都(石杨路南)', '重庆市重庆市九龙坡区九龙坡区石桥铺雨林商都(石杨路南)', '106.482315', '29.529648', '', '0', '', '', '', '', '1', '[\"real\"]', '0', '', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00');

-- -----------------------------
-- Table structure for `mall_order_batch_delivery`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_batch_delivery`;
CREATE TABLE `mall_order_batch_delivery` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `main_id` int(11) NOT NULL DEFAULT '0' COMMENT '操作人id',
  `status` int(11) NOT NULL DEFAULT '1' COMMENT '状态 进行中  已完成  已失败',
  `type` varchar(255) NOT NULL DEFAULT '操作类型 批量发货  批量打单 ....' COMMENT '操作类型',
  `total_num` int(11) NOT NULL DEFAULT '0' COMMENT '总发货单数',
  `success_num` int(11) NOT NULL DEFAULT '0' COMMENT '成功发货单数',
  `fail_num` int(11) NOT NULL DEFAULT '0' COMMENT '失败发货单数',
  `data` varchar(2000) NOT NULL DEFAULT '' COMMENT '导入文件的路径',
  `output` varchar(500) NOT NULL DEFAULT '' COMMENT '对外输出记录',
  `fail_output` varchar(500) NOT NULL DEFAULT '' COMMENT '失败记录',
  `fail_remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '失败原因',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单批量发货表';


-- -----------------------------
-- Table structure for `mall_order_delivery`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_delivery`;
CREATE TABLE `mall_order_delivery` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `order_id` int(11) NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '包裹名称',
  `delivery_type` varchar(50) NOT NULL DEFAULT '' COMMENT '配送方式',
  `sub_delivery_type` varchar(50) NOT NULL DEFAULT '' COMMENT '详细配送方式',
  `express_company_id` int(11) NOT NULL DEFAULT '0' COMMENT '快递公司id',
  `express_number` varchar(50) NOT NULL DEFAULT '' COMMENT '配送单号',
  `local_deliver_id` int(11) NOT NULL DEFAULT '0' COMMENT '同城配送员',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '配送状态',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `remark` varchar(1000) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单发货表';

-- -----------------------------
-- Records of `mall_order_delivery`
-- -----------------------------
INSERT INTO `mall_order_delivery` VALUES
('1', '2', '3', '', 'express', 'express', '4', '773345538587701', '0', '0', '1744076990', ''),
('2', '2', '4', '', 'express', 'express', '4', '773346917209769', '0', '0', '1744083713', ''),
('3', '2', '5', '', 'express', 'none_express', '0', '', '0', '0', '1744084691', ''),
('4', '2', '6', '', 'express', 'none_express', '0', '', '0', '0', '1744090001', ''),
('5', '2', '7', '', 'express', 'express', '1', 'YT7533727914968', '0', '0', '1744099448', ''),
('6', '2', '13', '', 'express', 'express', '4', '773345538587701', '0', '0', '1744104986', ''),
('7', '3', '14', '', 'express', 'none_express', '0', '', '0', '0', '1744168703', '');

-- -----------------------------
-- Table structure for `mall_order_discount`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_discount`;
CREATE TABLE `mall_order_discount` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
  `order_goods_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '参与的订单商品项',
  `type` varchar(255) NOT NULL DEFAULT '' COMMENT '类型 discount 优惠，gift 赠送',
  `num` int(11) NOT NULL DEFAULT '0' COMMENT '使用数量',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
  `discount_type` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠类型',
  `discount_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠类型id',
  `content` varchar(255) NOT NULL DEFAULT '' COMMENT '订单优惠说明',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `status` int(11) NOT NULL DEFAULT '1' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单优惠表';


-- -----------------------------
-- Table structure for `mall_order_goods`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_goods`;
CREATE TABLE `mall_order_goods` (
  `order_goods_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '购买会员id',
  `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
  `sku_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品规格id',
  `goods_name` varchar(400) NOT NULL DEFAULT '' COMMENT '商品名称',
  `sku_name` varchar(400) NOT NULL DEFAULT '' COMMENT '商品规格名称',
  `goods_image` varchar(2000) NOT NULL DEFAULT '' COMMENT '商品图片',
  `sku_image` varchar(1000) NOT NULL COMMENT 'sku规格图片',
  `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品单价',
  `num` int(11) NOT NULL DEFAULT '0' COMMENT '购买数量',
  `goods_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品总价',
  `is_enable_refund` int(11) NOT NULL DEFAULT '0' COMMENT '是否允许退款',
  `goods_type` varchar(255) NOT NULL DEFAULT '' COMMENT '商品类型',
  `delivery_status` varchar(255) NOT NULL DEFAULT '' COMMENT '配送状态',
  `delivery_id` int(11) NOT NULL DEFAULT '0' COMMENT '发货单号',
  `discount_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态',
  `order_refund_no` varchar(50) NOT NULL DEFAULT '' COMMENT '退款单号',
  `order_goods_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单项实付金额',
  `original_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品原价',
  `verify_count` int(11) NOT NULL DEFAULT '0' COMMENT '已核销次数',
  `verify_expire_time` int(11) NOT NULL DEFAULT '0' COMMENT '过期时间 0 为永久',
  `is_verify` int(11) NOT NULL DEFAULT '0' COMMENT '是否需要核销',
  `mall_discount_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台优惠',
  PRIMARY KEY (`order_goods_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单项表';

-- -----------------------------
-- Records of `mall_order_goods`
-- -----------------------------
INSERT INTO `mall_order_goods` VALUES
('1', '2', '1', '1', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '29.90', '1', '29.90', '0', 'real', '', '0', '0.00', '1', '', '29.90', '29.90', '0', '0', '0', '0.00'),
('2', '2', '2', '2', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.01', '1', '0.01', '0', 'real', '', '0', '0.00', '1', '', '0.01', '0.01', '0', '0', '0', '0.00'),
('3', '2', '3', '2', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.01', '1', '0.01', '0', 'real', 'taked', '1', '0.00', '1', '', '0.01', '0.01', '0', '0', '0', '0.00'),
('4', '2', '4', '2', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.03', '1', '0.03', '0', 'real', 'delivery_finish', '2', '0.00', '3', '20250408551422207582208', '0.03', '0.03', '0', '0', '0', '0.00'),
('5', '2', '5', '2', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.03', '1', '0.03', '0', 'real', 'taked', '3', '0.00', '1', '', '0.03', '0.03', '0', '0', '0', '0.00'),
('6', '2', '6', '2', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.30', '1', '0.30', '0', 'real', 'taked', '4', '0.00', '1', '', '0.30', '0.30', '0', '0', '0', '0.00'),
('7', '2', '7', '2', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.30', '1', '0.30', '1', 'real', 'delivery_finish', '5', '0.00', '2', '20250409551756175446016', '0.30', '0.30', '0', '0', '0', '0.00'),
('8', '2', '8', '7', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.30', '1', '0.30', '0', 'real', '', '0', '0.00', '1', '', '0.30', '0.30', '0', '0', '0', '0.00'),
('9', '2', '9', '7', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.30', '1', '0.30', '0', 'real', '', '0', '0.00', '1', '', '0.30', '0.30', '0', '0', '0', '0.00'),
('10', '2', '10', '2', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.30', '1', '0.30', '0', 'real', '', '0', '0.00', '1', '', '0.30', '0.30', '0', '0', '0', '0.00'),
('11', '2', '11', '14', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.30', '1', '0.30', '0', 'real', '', '0', '0.00', '1', '', '0.30', '0.30', '0', '0', '0', '0.00'),
('12', '2', '12', '15', '16', '16', '现摘新鲜蚕豆农家带壳生蚕豆5斤包邮', '', 'upload/attachment/image/2/202504/03/17436577352bfa5bf5b85a5377d871b5bdbff375a8_local.jpg', 'upload/attachment/image/2/202504/03/17436577352bfa5bf5b85a5377d871b5bdbff375a8_local.jpg', '6.89', '1', '6.89', '0', 'real', '', '0', '0.00', '1', '', '6.89', '6.89', '0', '0', '0', '0.00'),
('13', '2', '13', '2', '3', '3', '福临门长粒香大米2.5kg', '', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', 'upload/attachment/image/2/202504/01/174347555319cec29805cfeb43c099d45963aa929b_local.jpg', '0.30', '1', '0.30', '1', 'real', 'delivery_finish', '6', '0.00', '2', '20250409551756375322624', '0.30', '0.30', '0', '0', '0', '0.00'),
('14', '3', '14', '2', '17', '17', '清风抽纸原木纯品3层110抽4连包【1提】', '', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', '0.01', '1', '0.01', '0', 'real', 'taked', '7', '0.00', '1', '', '0.01', '0.01', '0', '0', '0', '0.00'),
('15', '3', '15', '7', '17', '17', '清风抽纸原木纯品3层110抽4连包【1提】', '', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', '0.01', '1', '0.01', '0', 'real', '', '0', '0.00', '1', '', '0.01', '0.01', '0', '0', '0', '0.00'),
('16', '3', '16', '16', '17', '17', '清风抽纸原木纯品3层110抽4连包【1提】', '', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', 'upload/attachment/image/3/202504/03/1743658045039380fc0d094e955df5141dd15ed214_local.jpeg', '0.01', '1', '0.01', '0', 'real', '', '0', '0.00', '1', '', '0.01', '0.01', '0', '0', '0', '0.00');

-- -----------------------------
-- Table structure for `mall_order_group`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_group`;
CREATE TABLE `mall_order_group` (
  `group_id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员id',
  `body` varchar(1000) NOT NULL DEFAULT '' COMMENT '订单内容',
  `goods_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品金额',
  `delivery_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '配送金额',
  `shop_discount_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '店铺优惠金额',
  `mall_discount_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台优惠金额',
  `order_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单金额',
  `shop_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '店铺结算金额',
  `mall_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台结算金额',
  `status` int(11) NOT NULL DEFAULT '1' COMMENT '状态',
  `is_bundle_pay` int(11) NOT NULL DEFAULT '0' COMMENT '是否只能捆绑支付',
  `out_trade_no` varchar(255) NOT NULL DEFAULT '' COMMENT '外部交易号',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `pay_time` int(11) NOT NULL DEFAULT '0' COMMENT '支付时间',
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id(跨店支付为0)',
  `taker_full_address` varchar(1000) NOT NULL DEFAULT '' COMMENT '收货地址',
  PRIMARY KEY (`group_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单组表';

-- -----------------------------
-- Records of `mall_order_group`
-- -----------------------------
INSERT INTO `mall_order_group` VALUES
('1', '1', '福临门长粒香大米2.5kg', '29.90', '0.00', '0.00', '0.00', '29.90', '0.00', '0.00', '3', '0', '', '1743563471', '0', '0', '北京市北京市东城区12'),
('5', '2', '福临门长粒香大米2.5kg', '0.01', '0.00', '0.00', '0.00', '0.01', '0.00', '0.00', '2', '0', '', '1743574552', '1743574567', '3', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场'),
('6', '2', '福临门长粒香大米2.5kg', '0.03', '0.00', '0.00', '0.00', '0.03', '0.00', '0.00', '2', '0', '', '1744083615', '1744083636', '0', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场'),
('7', '2', '福临门长粒香大米2.5kg', '0.03', '0.00', '0.00', '0.00', '0.03', '0.00', '0.00', '2', '0', '', '1744084400', '1744084417', '0', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场'),
('8', '2', '福临门长粒香大米2.5kg', '0.30', '0.00', '0.00', '0.00', '0.30', '0.00', '0.00', '2', '0', '', '1744089729', '1744089753', '0', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场'),
('9', '2', '福临门长粒香大米2.5kg', '0.30', '0.00', '0.00', '0.00', '0.30', '0.00', '0.00', '2', '0', '', '1744099298', '1744099316', '0', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场'),
('12', '7', '福临门长粒香大米2.5kg', '0.30', '0.00', '0.00', '0.00', '0.30', '0.00', '0.00', '3', '0', '', '1744103087', '0', '8', '重庆市重庆市九龙坡区九龙坡区石杨路(雨林商都)'),
('13', '7', '福临门长粒香大米2.5kg', '0.30', '0.00', '0.00', '0.00', '0.30', '0.00', '0.00', '3', '0', '', '1744103595', '0', '0', '重庆市重庆市九龙坡区九龙坡区石杨路(雨林商都)'),
('14', '2', '福临门长粒香大米2.5kg', '0.30', '0.00', '0.00', '0.00', '0.30', '0.00', '0.00', '3', '0', '', '1744103842', '0', '0', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场'),
('16', '14', '福临门长粒香大米2.5kg', '0.30', '0.00', '0.00', '0.00', '0.30', '0.00', '0.00', '3', '0', '', '1744103929', '0', '0', '重庆市重庆市九龙坡区九龙坡区石桥铺雨林商都(石杨路南)'),
('17', '15', '现摘新鲜蚕豆农家带壳生蚕豆5斤包邮', '6.89', '0.00', '0.00', '0.00', '6.89', '0.00', '0.00', '3', '0', '', '1744104136', '0', '0', '河北省唐山市古冶区发v宝宝'),
('18', '2', '福临门长粒香大米2.5kg', '0.30', '0.00', '0.00', '0.00', '0.30', '0.00', '0.00', '2', '0', '', '1744104916', '1744104931', '0', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场'),
('20', '7', '清风抽纸原木纯品3层110抽4连包【1提】', '0.01', '0.00', '0.00', '0.00', '0.01', '0.00', '0.00', '1', '0', '', '1744164531', '0', '0', '重庆市重庆市九龙坡区九龙坡区石杨路(雨林商都)'),
('21', '16', '清风抽纸原木纯品3层110抽4连包【1提】', '0.01', '0.00', '0.00', '0.00', '0.01', '0.00', '0.00', '1', '0', '', '1744164690', '0', '0', '重庆市重庆市九龙坡区九龙坡区石桥铺雨林商都(石杨路南)'),
('22', '2', '清风抽纸原木纯品3层110抽4连包【1提】', '0.01', '0.00', '0.00', '0.00', '0.01', '0.00', '0.00', '2', '0', '', '1744165353', '1744165363', '14', '重庆市重庆市沙坪坝区重庆沙坪坝三峡广场');

-- -----------------------------
-- Table structure for `mall_order_group_discount`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_group_discount`;
CREATE TABLE `mall_order_group_discount` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `site_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '站点ids',
  `order_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '订单ids',
  `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单组id',
  `type` varchar(255) NOT NULL DEFAULT '' COMMENT '类型 discount 优惠，gift 赠送',
  `num` int(11) NOT NULL DEFAULT '0' COMMENT '使用数量',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
  `discount_type` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠类型',
  `discount_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠类型id',
  `content` varchar(255) NOT NULL DEFAULT '' COMMENT '订单优惠说明',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `status` int(11) NOT NULL DEFAULT '1' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单组优惠表';


-- -----------------------------
-- Table structure for `mall_order_log`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_log`;
CREATE TABLE `mall_order_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
  `main_type` varchar(255) NOT NULL DEFAULT '操作人类型',
  `main_id` int(11) NOT NULL DEFAULT '0' COMMENT '操作人id',
  `status` int(11) DEFAULT NULL COMMENT '订单状态',
  `type` varchar(255) NOT NULL DEFAULT '',
  `content` varchar(255) DEFAULT NULL COMMENT '日志内容',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单日志表';

-- -----------------------------
-- Records of `mall_order_log`
-- -----------------------------
INSERT INTO `mall_order_log` VALUES
('1', '1', 'member', '1', '1', 'order_create', '', '1743563471'),
('2', '2', 'member', '2', '1', 'order_create', '', '1743571729'),
('3', '3', 'member', '2', '1', 'order_create', '', '1743571819'),
('4', '3', 'member', '2', '2', 'order_pay', '', '1743574566'),
('5', '3', 'store', '1', '3', 'order_delivery', '', '1744076990'),
('6', '2', 'member', '2', '-1', 'order_close', '', '1744077366'),
('7', '3', 'member', '2', '5', 'order_finish', '', '1744077823'),
('8', '4', 'member', '2', '1', 'order_create', '', '1744083615'),
('9', '4', 'member', '2', '2', 'order_pay', '', '1744083635'),
('10', '4', 'store', '1', '3', 'order_delivery', '', '1744083713'),
('11', '4', 'system', '0', '-1', 'order_close', '', '1744083895'),
('12', '5', 'member', '2', '1', 'order_create', '', '1744084400'),
('13', '5', 'member', '2', '2', 'order_pay', '', '1744084417'),
('14', '5', 'store', '1', '3', 'order_delivery', '', '1744084691'),
('15', '5', 'member', '2', '5', 'order_finish', '', '1744084717'),
('16', '6', 'member', '2', '1', 'order_create', '', '1744089729'),
('17', '6', 'member', '2', '2', 'order_pay', '', '1744089752'),
('18', '6', 'store', '1', '3', 'order_delivery', '', '1744090001'),
('19', '6', 'member', '2', '5', 'order_finish', '', '1744090013'),
('20', '3', 'system', '0', '5', 'order_close_allow_refund', '', '1744092600'),
('21', '5', 'system', '0', '5', 'order_close_allow_refund', '', '1744092600'),
('22', '6', 'system', '0', '5', 'order_close_allow_refund', '', '1744092600'),
('23', '1', 'system', '0', '-1', 'order_close', '', '1744092600'),
('24', '7', 'member', '2', '1', 'order_create', '', '1744099298'),
('25', '7', 'member', '2', '2', 'order_pay', '', '1744099315'),
('26', '7', 'store', '1', '3', 'order_delivery', '', '1744099448'),
('27', '8', 'member', '7', '1', 'order_create', '', '1744103072'),
('28', '9', 'member', '7', '1', 'order_create', '', '1744103595'),
('29', '10', 'member', '2', '1', 'order_create', '', '1744103842'),
('30', '11', 'member', '14', '1', 'order_create', '', '1744103929'),
('31', '12', 'member', '15', '1', 'order_create', '', '1744104136'),
('32', '13', 'member', '2', '1', 'order_create', '', '1744104916'),
('33', '13', 'member', '2', '2', 'order_pay', '', '1744104931'),
('34', '13', 'store', '1', '3', 'order_delivery', '', '1744104986'),
('35', '8', 'system', '0', '-1', 'order_close', '', '1744139100'),
('36', '9', 'system', '0', '-1', 'order_close', '', '1744139642'),
('37', '10', 'system', '0', '-1', 'order_close', '', '1744139882'),
('38', '11', 'system', '0', '-1', 'order_close', '', '1744139942'),
('39', '12', 'system', '0', '-1', 'order_close', '', '1744140182'),
('40', '14', 'member', '2', '1', 'order_create', '', '1744164367'),
('41', '15', 'member', '7', '1', 'order_create', '', '1744164531'),
('42', '16', 'member', '16', '1', 'order_create', '', '1744164690'),
('43', '14', 'member', '2', '2', 'order_pay', '', '1744165362'),
('44', '14', 'store', '2', '3', 'order_delivery', '', '1744168703'),
('45', '14', 'member', '2', '5', 'order_finish', '', '1744171090'),
('46', '14', 'system', '0', '5', 'order_close_allow_refund', '', '1744171140');

-- -----------------------------
-- Table structure for `mall_order_refund`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_refund`;
CREATE TABLE `mall_order_refund` (
  `refund_id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
  `order_goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单项id',
  `order_refund_no` varchar(255) NOT NULL DEFAULT '0' COMMENT '退款单号',
  `refund_type` varchar(255) NOT NULL DEFAULT '0' COMMENT '退款方式 ',
  `reason` varchar(255) NOT NULL DEFAULT '0' COMMENT '退款原因 ',
  `member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员id',
  `apply_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '申请退款',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '实际退款',
  `status` varchar(30) NOT NULL DEFAULT '0' COMMENT '退款状态',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `transfer_time` int(11) NOT NULL DEFAULT '0' COMMENT '转账时间',
  `remark` varchar(2000) NOT NULL DEFAULT '描述' COMMENT '描述',
  `voucher` varchar(2000) NOT NULL DEFAULT '凭证' COMMENT '凭证',
  `source` varchar(255) NOT NULL DEFAULT '' COMMENT '来源 system 系统 member 会员',
  `timeout` int(11) NOT NULL DEFAULT '0' COMMENT '操作超时时间',
  `refund_no` varchar(255) NOT NULL DEFAULT '' COMMENT '退款交易号',
  `delivery` varchar(500) NOT NULL DEFAULT '' COMMENT '退货配送信息',
  `shop_reason` varchar(1000) NOT NULL DEFAULT '' COMMENT '商家拒绝原因',
  `refund_address` varchar(1000) NOT NULL DEFAULT '' COMMENT '商家退货地址',
  `is_refund_delivery` int(11) NOT NULL DEFAULT '0' COMMENT '是否退运费',
  PRIMARY KEY (`refund_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单退款表';

-- -----------------------------
-- Records of `mall_order_refund`
-- -----------------------------
INSERT INTO `mall_order_refund` VALUES
('1', '2', '4', '4', '20250408551422207582208', '1', '其他', '2', '0.03', '0.03', '8', '1744083762', '1744083895', '', '[]', '1', '0', '20250408551422667055104', '', '', '', '1'),
('2', '2', '7', '7', '20250409551756175446016', '1', '其他', '2', '0.30', '0.30', '6', '1744165297', '0', '', '[]', '1', '0', '', '', '', '', '1'),
('3', '2', '13', '13', '20250409551756375322624', '1', '其他', '2', '0.30', '0.30', '6', '1744165346', '0', '', '[]', '1', '0', '', '', '', '', '1');

-- -----------------------------
-- Table structure for `mall_order_refund_log`
-- -----------------------------
DROP TABLE IF EXISTS `mall_order_refund_log`;
CREATE TABLE `mall_order_refund_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `order_refund_no` varchar(100) NOT NULL DEFAULT '' COMMENT '退款编号',
  `main_type` varchar(255) NOT NULL DEFAULT '操作人类型',
  `main_id` int(11) NOT NULL DEFAULT '0' COMMENT '操作人id',
  `status` int(11) DEFAULT NULL COMMENT '退款状态',
  `type` varchar(255) NOT NULL DEFAULT '',
  `content` varchar(255) DEFAULT NULL COMMENT '日志内容',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单退款日志表';

-- -----------------------------
-- Records of `mall_order_refund_log`
-- -----------------------------
INSERT INTO `mall_order_refund_log` VALUES
('1', '20250408551422207582208', 'member', '2', '1', 'apply', '', '1744083762'),
('2', '20250408551422207582208', 'store', '1', '6', 'agree_audit_apply', '', '1744083874'),
('3', '20250408551422207582208', 'system', '0', '8', 'finish', '', '1744083895'),
('4', '20250409551756175446016', 'member', '2', '1', 'apply', '', '1744165297'),
('5', '20250409551756375322624', 'member', '2', '1', 'apply', '', '1744165346'),
('6', '20250409551756375322624', 'store', '1', '6', 'agree_audit_apply', '', '1744165794'),
('7', '20250409551756175446016', 'store', '1', '6', 'agree_audit_apply', '', '1744166143');

-- -----------------------------
-- Table structure for `mall_shop_address`
-- -----------------------------
DROP TABLE IF EXISTS `mall_shop_address`;
CREATE TABLE `mall_shop_address` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL DEFAULT '0' COMMENT '站点id',
  `contact_name` varchar(255) NOT NULL DEFAULT '' COMMENT '联系人',
  `mobile` varchar(50) NOT NULL DEFAULT '' COMMENT '手机号',
  `province_id` int(11) NOT NULL DEFAULT '0' COMMENT '省',
  `city_id` int(11) NOT NULL DEFAULT '0' COMMENT '市',
  `district_id` int(11) NOT NULL DEFAULT '0' COMMENT '区',
  `address` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
  `full_address` varchar(1000) NOT NULL DEFAULT '' COMMENT '地址',
  `lat` varchar(50) NOT NULL DEFAULT '' COMMENT '纬度',
  `lng` varchar(50) NOT NULL DEFAULT '' COMMENT '经度',
  `is_delivery_address` int(11) NOT NULL DEFAULT '0' COMMENT '是否是发货地址',
  `is_refund_address` int(11) NOT NULL DEFAULT '0' COMMENT '是否是退货地址',
  `is_default_delivery` int(11) NOT NULL DEFAULT '0' COMMENT '默认发货地址',
  `is_default_refund` int(11) NOT NULL DEFAULT '0' COMMENT '默认收货地址',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商家地址库';


-- -----------------------------
-- Table structure for `mall_web_floor`
-- -----------------------------
DROP TABLE IF EXISTS `mall_web_floor`;
CREATE TABLE `mall_web_floor` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `floor_name` varchar(255) NOT NULL DEFAULT '' COMMENT '楼层名称',
  `temp` varchar(255) NOT NULL DEFAULT '' COMMENT '配置模板',
  `config` text COMMENT '配置参数',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='首页楼层';

-- -----------------------------
-- Records of `mall_web_floor`
-- -----------------------------
INSERT INTO `mall_web_floor` VALUES
('1', '家具电器', 'default', '{\"title\":\"\\u4e00\\u7ea7\\u6807\\u9898\",\"sub_title\":\"\\u4e8c\\u7ea7\\u6807\\u9898\",\"goods_ids\":[],\"adv_img1\":\"addon\\/mall\\/web\\/floor_01.png\",\"adv_img2\":\"addon\\/mall\\/web\\/floor_02.png\",\"url\":{\"name\":\"\"}}', '1', '1740447853', '1740447853'),
('2', '美容美护', 'default', '{\"title\":\"\\u4e00\\u7ea7\\u6807\\u9898\",\"sub_title\":\"\\u4e8c\\u7ea7\\u6807\\u9898\",\"goods_ids\":[],\"adv_img1\":\"addon\\/mall\\/web\\/floor_01.png\",\"adv_img2\":\"addon\\/mall\\/web\\/floor_02.png\",\"url\":{\"name\":\"\"}}', '2', '1740447853', '1740447853');
