
SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for fa_pickup_cardcode
-- ----------------------------
CREATE TABLE IF NOT EXISTS  `__PREFIX__pickup_cardcode` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `gp_id` int(10) NOT NULL DEFAULT '0' COMMENT '礼包ID',
  `card_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '卡号',
  `card_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '卡密码',
  `card_status` enum('1','2','3','4') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '卡状态:1=未制卡,2=未使用,3=已使用,4=已失效',
  `createtime` bigint(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
  `usedtime` bigint(11) NOT NULL DEFAULT '0' COMMENT '使用时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `card_pwd` (`card_pwd`) USING BTREE,
  KEY `card_id` (`card_id`) USING BTREE,
  KEY `card` (`card_id`,`card_pwd`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='兑换卡密';

-- ----------------------------
-- Records of fa_pickup_cardcode
-- ----------------------------
INSERT INTO `__PREFIX__pickup_cardcode` VALUES ('1', '1', '111111', '111111', '1', '1667631279', '0');
INSERT INTO `__PREFIX__pickup_cardcode` VALUES ('2', '1', '222222', '222222', '1', '1667631279', '0');

-- ----------------------------
-- Table structure for fa_pickup_goods
-- ----------------------------
CREATE TABLE IF NOT EXISTS  `__PREFIX__pickup_goods` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '礼品标题',
  `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '礼品图片',
  `subtitle` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '礼品简介',
  `price` float(10,2) NOT NULL DEFAULT '0.00' COMMENT '礼品市场价',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='商品管理';

-- ----------------------------
-- Records of fa_pickup_goods
-- ----------------------------
INSERT INTO `__PREFIX__pickup_goods` VALUES ('1', '端午节员工福利礼盒套餐五', '/assets/addons/pickup/images/e8df3e893ad918611fe6bae4c4840617.png', '端午节员工福利礼盒套餐五', '998.00');
INSERT INTO `__PREFIX__pickup_goods` VALUES ('2', '端午节员工福利礼盒套餐四', '/assets/addons/pickup/images/ca69b13902a0b92009b38aac154ba83b.png', '端午节员工福利礼盒套餐四', '998.00');
INSERT INTO `__PREFIX__pickup_goods` VALUES ('3', '端午节员工福利礼盒套餐三', '/assets/addons/pickup/images/5352ed2092b1fd60985ddc632c34a859.png', '端午节员工福利礼盒套餐三', '998.00');
INSERT INTO `__PREFIX__pickup_goods` VALUES ('4', '端午节员工福利礼盒套餐二', '/assets/addons/pickup/images/8e3c66dc13936b7f5cd79a5e61d7c38e.png', '端午节员工福利礼盒套餐二', '998.00');
INSERT INTO `__PREFIX__pickup_goods` VALUES ('5', '端午节员工福利礼盒套餐一', '/assets/addons/pickup/images/2fbbd5750bb9d1edb52c1e892c1b622e.png', '端午节员工福利礼盒套餐一', '998.00');

-- ----------------------------
-- Table structure for fa_pickup_order
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__pickup_order` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `order_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单编号',
  `gift_goods_ids` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '礼品ID',
  `gift_goods_title` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '礼品名称',
  `gift_goods_image` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '礼品图片',
  `gift_package_id` int(10) NOT NULL DEFAULT '0' COMMENT '礼包ID',
  `gift_package_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '礼包名称',
  `gift_package_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '礼包配图',
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收件人',
  `mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收件人手机号',
  `province_city` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '省市区',
  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '街道地址',
  `ship_date_expected` bigint(11) NOT NULL DEFAULT '0' COMMENT '预约发货日期',
  `comments` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '留言',
  `card_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '卡号',
  `createtime` bigint(11) NOT NULL DEFAULT '0' COMMENT '下单时间',
  `kd_company` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '快递公司',
  `kd_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '快递单号',
  `ship_date` bigint(11) NOT NULL DEFAULT '0' COMMENT '发货时间',
  `status` enum('1','2','3','4') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '订单状态:1=待发货,2=已发货,3=已完成,4=已关闭',
  `gift_goods` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '选择的礼品',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`) USING BTREE,
  KEY `card_id` (`card_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='兑换订单';

-- ----------------------------
-- Records of fa_pickup_order
-- ----------------------------

-- ----------------------------
-- Table structure for fa_pickup_package
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__pickup_package` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '活动标题',
  `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '活动配图',
  `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '活动说明',
  `status` enum('1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '2' COMMENT '活动状态:1=停止,2=启动',
  `start_time` bigint(11) NOT NULL DEFAULT '0' COMMENT '活动开始时间',
  `end_time` bigint(11) NOT NULL DEFAULT '0' COMMENT '活动结束时间',
  `agreement` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '提货说明',
  `max_select` int(4) NOT NULL DEFAULT '1' COMMENT '最多选择礼品数',
  `goods_list` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '可选礼品列表',
  `createtime` bigint(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='礼包活动管理';

-- ----------------------------
-- Records of fa_pickup_package
-- ----------------------------
INSERT INTO `__PREFIX__pickup_package` VALUES ('1', '端午节员工福利发放大礼包', '/assets/addons/pickup/images/c81119419dff5f3e1e0d31c7c8d45842.png', '端午节员工福利发放大礼包', '2', '1585215864', '1769852664', '端午节员工福利发放大礼包', '1', '[\"5\",\"4\",\"3\",\"2\",\"1\"]', '1585215952');
SET FOREIGN_KEY_CHECKS=1;
