💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
~~~[sql] CREATE TABLE `xi_goods` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `cate_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID', `brands_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '品牌ID', `express_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '快递ID', `template_id` int(11) unsigned DEFAULT NULL COMMENT '模板ID', `sn` varchar(32) NOT NULL DEFAULT '' COMMENT '商品唯一编码', `name` varchar(64) NOT NULL DEFAULT '' COMMENT '名称', `weight` float(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '重量(kg)', `volume` float(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '体积(m³)', `thumb` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '缩略图', `banner` varchar(512) NOT NULL DEFAULT 'a:1:{i:0;s:53:"http://oss.dgyouduo.com/static/img/no-image-16x10.png";}' COMMENT '横幅(轮播图)', `summary` varchar(128) NOT NULL DEFAULT '' COMMENT '摘要', `content` text NOT NULL COMMENT '内容', `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '普通价格', `market_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '市场价格', `inventory` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存', `view_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '浏览数', `sale_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '销售数', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_free_shipping` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否包邮', `is_hot` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否推荐', `is_new` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否新品', `is_real` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否实体商品', `is_sale` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否上架', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', `saled_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '上架时间', PRIMARY KEY (`id`), UNIQUE KEY `sn` (`sn`) ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品'; ~~~ ~~~[sql] CREATE TABLE `xi_goods_brands` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `cate_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID', `name` varchar(16) NOT NULL DEFAULT '' COMMENT '名称', `description` varchar(128) NOT NULL DEFAULT '' COMMENT '描述', `logo` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '商标', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`stores_id`,`cate_id`,`is_trash`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品品牌'; ~~~ ~~~[sql] CREATE TABLE `xi_goods_category` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父ID', `parent_id_path` varchar(32) NOT NULL DEFAULT '' COMMENT '父ID路径', `level` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '级别', `name` varchar(32) NOT NULL DEFAULT '' COMMENT '名称', `thumb` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '缩略图', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_show` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否显示在列表', `is_hot` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否显示在推荐', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`stores_id`,`parent_id`,`is_trash`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品分类'; ~~~ ~~~[sql] CREATE TABLE `xi_goods_evaluate` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `member_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID', `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID', `sku_key` varchar(32) DEFAULT NULL COMMENT '存放SKU库存量项目ID进行拼接', `content` varchar(255) NOT NULL DEFAULT '' COMMENT '内容', `images` varchar(512) NOT NULL DEFAULT '/img/no-image.png' COMMENT '图片', `grade` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '评分', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_anonymity` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否匿名', `is_audit` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否审核,0=>未审核,1=>审核通过,2=>审核驳回', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品评价'; ~~~ ~~~[sql] CREATE TABLE `xi_goods_parameter` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `cate_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID', `name` varchar(32) NOT NULL DEFAULT '' COMMENT '名称', `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '属性值类型(录入方式),1=>单行文本,2=>多行文本,3=>单选,4=>多选', `default_values` varchar(255) NOT NULL DEFAULT '' COMMENT '可选属性值(数组序列化)', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`stores_id`,`cate_id`,`is_trash`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品参数'; ~~~ ~~~[sql] CREATE TABLE `xi_goods_parameter_value` ( `param_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '参数ID', `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID', `value` varchar(255) NOT NULL DEFAULT '' COMMENT '参数值', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', UNIQUE KEY `param_id` (`param_id`,`goods_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品参数值'; ~~~ ~~~[sql] CREATE TABLE `xi_goods_sku` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `cate_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID', `name` varchar(32) NOT NULL DEFAULT '' COMMENT '名称', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`stores_id`,`cate_id`,`is_trash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品库存量单位'; ~~~ ~~~[sql] CREATE TABLE `xi_goods_sku_item` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `sku_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存量项目ID', `name` varchar(16) NOT NULL DEFAULT '' COMMENT '名称', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`sku_id`,`is_trash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品库存量项目'; ~~~ ~~~[sql] CREATE TABLE `xi_goods_sku_value` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID', `sku_key` varchar(32) NOT NULL DEFAULT '' COMMENT '存放SKU库存量项目ID进行拼接', `sn` varchar(32) NOT NULL DEFAULT '' COMMENT '商品唯一编码', `thumb` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '缩略图', `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '普通价格', `market_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '市场价格', `inventory` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `sn` (`sn`), UNIQUE KEY `sku_key` (`sku_key`,`stores_id`,`goods_id`,`is_trash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品库存量值'; ~~~