+ 立即免费创建此表 返回数据库大全

MySQL建表SQL语句

数据库结构:电商-订单中所包含的商品:https://open.yesapi.cn/tablelist/yesapi_mall_oms_order_item.html


-- 数据库大全:电商-订单中所包含的商品
-- 来源:YesApi.cn
CREATE TABLE `yesapi_mall_oms_order_item` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `order_id` bigint(20) NULL COMMENT '订单id',
    `order_sn` varchar(64) NULL COMMENT '订单编号',
    `product_id` bigint(20) NULL COMMENT '',
    `product_pic` varchar(500) NULL COMMENT '',
    `product_name` varchar(200) NULL COMMENT '',
    `product_brand` varchar(200) NULL COMMENT '',
    `product_sn` varchar(64) NULL COMMENT '',
    `product_price` decimal(10,2) NULL COMMENT '销售价格',
    `product_quantity` int(11) NULL COMMENT '购买数量',
    `product_sku_id` bigint(20) NULL COMMENT '商品sku编号',
    `product_sku_code` varchar(50) NULL COMMENT '商品sku条码',
    `product_category_id` bigint(20) NULL COMMENT '商品分类id',
    `sp1` varchar(100) NULL COMMENT '商品的销售属性',
    `sp2` varchar(100) NULL COMMENT '',
    `sp3` varchar(100) NULL COMMENT '',
    `promotion_name` varchar(200) NULL COMMENT '商品促销名称',
    `promotion_amount` decimal(10,2) NULL COMMENT '商品促销分解金额',
    `coupon_amount` decimal(10,2) NULL COMMENT '优惠券优惠分解金额',
    `integration_amount` decimal(10,2) NULL COMMENT '积分优惠分解金额',
    `real_amount` decimal(10,2) NULL COMMENT '该商品经过优惠后的分解金额',
    `gift_integration` int(11) NULL DEFAULT '0' COMMENT '',
    `gift_growth` int(11) NULL DEFAULT '0' COMMENT '',
    `product_attr` varchar(500) NULL COMMENT '商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '电商-订单中所包含的商品';

复制后,到数据库执行,即可创建此数据库表。


MySQL数据库表结构设计

第 1-23 条, 共 23 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
order_idbigint(20)订单id无索引
order_snvarchar(64)订单编号无索引
product_idbigint(20)无索引
product_picvarchar(500)无索引
product_namevarchar(200)无索引
product_brandvarchar(200)无索引
product_snvarchar(64)无索引
product_pricedecimal(10,2)销售价格无索引
product_quantityint(11)购买数量无索引
product_sku_idbigint(20)商品sku编号无索引
product_sku_codevarchar(50)商品sku条码无索引
product_category_idbigint(20)商品分类id无索引
sp1varchar(100)商品的销售属性无索引
sp2varchar(100)无索引
sp3varchar(100)无索引
promotion_namevarchar(200)商品促销名称无索引
promotion_amountdecimal(10,2)商品促销分解金额无索引
coupon_amountdecimal(10,2)优惠券优惠分解金额无索引
integration_amountdecimal(10,2)积分优惠分解金额无索引
real_amountdecimal(10,2)该商品经过优惠后的分解金额无索引
gift_integrationint(11)0无索引0
gift_growthint(11)0无索引0
product_attrvarchar(500)商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]无索引

猜你喜欢

MySQL数据库设计 ShopXO商城-管理员

MySQL数据库设计 ShopXO商城-用户留言/问答

MySQL数据库设计 ShopXO商城-手机 - 用户中心导航

MySQL数据库设计 ShopXO商城-手机 - 首页导航

MySQL数据库设计 ShopXO商城-文章

MySQL数据库设计 ShopXO商城-文章分类

MySQL数据库设计 ShopXO商城-附件

MySQL数据库设计 ShopXO商城-品牌

MySQL数据库设计 ShopXO商城-品牌分类

MySQL数据库设计 ShopXO商城-购物车

MySQL数据库设计 ShopXO商城-基本配置参数

MySQL数据库设计 ShopXO商城-自定义页面

MySQL数据库设计 ShopXO商城-快递公司

MySQL数据库设计 ShopXO商城-商品

MySQL数据库设计 ShopXO商城-用户商品浏览

MySQL数据库设计 ShopXO商城-商品分类

MySQL数据库设计 ShopXO商城-商品分类关联

MySQL数据库设计 ShopXO商城-商品评论

MySQL数据库设计 ShopXO商城-商品手机详情

MySQL数据库设计 ShopXO商城-用户商品收藏



回到顶部 ↑