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

MySQL建表SQL语句

数据库结构:微信商城小程序-订单表:https://open.yesapi.cn/tablelist/yesapi_litemall_order.html


-- 数据库大全:微信商城小程序-订单表
-- 来源:YesApi.cn
CREATE TABLE `yesapi_litemall_order` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` int(11) NULL COMMENT '用户表的用户ID',
    `order_sn` varchar(63) NULL COMMENT '订单编号',
    `order_status` smallint(6) NULL COMMENT '订单状态',
    `consignee` varchar(63) NULL COMMENT '收货人名称',
    `mobile` varchar(63) NULL COMMENT '收货人手机号',
    `address` varchar(127) NULL COMMENT '收货具体地址',
    `message` varchar(512) NULL COMMENT '用户订单留言',
    `goods_price` decimal(10,2) NULL COMMENT '商品总费用',
    `freight_price` decimal(10,2) NULL COMMENT '配送费用',
    `coupon_price` decimal(10,2) NULL COMMENT '优惠券减免',
    `integral_price` decimal(10,2) NULL COMMENT '用户积分减免',
    `groupon_price` decimal(10,2) NULL COMMENT '团购优惠价减免',
    `order_price` decimal(10,2) NULL COMMENT '订单费用, = goods_price + freight_price - coupon_price',
    `actual_price` decimal(10,2) NULL COMMENT '实付费用, = order_price - integral_price',
    `pay_id` varchar(63) NULL COMMENT '微信付款编号',
    `pay_time` datetime NULL COMMENT '微信付款时间',
    `ship_sn` varchar(63) NULL COMMENT '发货编号',
    `ship_channel` varchar(63) NULL COMMENT '发货快递公司',
    `ship_time` datetime NULL COMMENT '发货开始时间',
    `confirm_time` datetime NULL COMMENT '用户确认收货时间',
    `comments` smallint(6) NULL DEFAULT '0' COMMENT '待评价订单商品数量',
    `end_time` datetime NULL COMMENT '订单关闭时间',
    `deleted` tinyint(1) NULL DEFAULT '0' COMMENT '逻辑删除',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '微信商城小程序-订单表';

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


MySQL数据库表结构设计

第 1-23 条, 共 23 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
user_idint(11)用户表的用户ID无索引
order_snvarchar(63)订单编号无索引
order_statussmallint(6)订单状态无索引
consigneevarchar(63)收货人名称无索引
mobilevarchar(63)收货人手机号无索引
addressvarchar(127)收货具体地址无索引
messagevarchar(512)用户订单留言无索引
goods_pricedecimal(10,2)商品总费用无索引
freight_pricedecimal(10,2)配送费用无索引
coupon_pricedecimal(10,2)优惠券减免无索引
integral_pricedecimal(10,2)用户积分减免无索引
groupon_pricedecimal(10,2)团购优惠价减免无索引
order_pricedecimal(10,2)订单费用, = goods_price + freight_price - coupon_price无索引
actual_pricedecimal(10,2)实付费用, = order_price - integral_price无索引
pay_idvarchar(63)微信付款编号无索引
pay_timedatetime微信付款时间无索引
ship_snvarchar(63)发货编号无索引
ship_channelvarchar(63)发货快递公司无索引
ship_timedatetime发货开始时间无索引
confirm_timedatetime用户确认收货时间无索引
commentssmallint(6)0待评价订单商品数量无索引0
end_timedatetime订单关闭时间无索引
deletedtinyint(1)0逻辑删除无索引0

猜你喜欢

MySQL数据库设计 微信商城小程序-广告表

MySQL数据库设计 微信商城小程序-收货地址表

MySQL数据库设计 微信商城小程序-管理员表

MySQL数据库设计 微信商城小程序-品牌商表

MySQL数据库设计 微信商城小程序-购物车商品表

MySQL数据库设计 微信商城小程序-类目表

MySQL数据库设计 微信商城小程序-收藏表

MySQL数据库设计 微信商城小程序-评论表

MySQL数据库设计 微信商城小程序-优惠券信息及规则表

MySQL数据库设计 微信商城小程序-优惠券用户使用表

MySQL数据库设计 微信商城小程序-意见反馈表

MySQL数据库设计 微信商城小程序-用户浏览足迹表

MySQL数据库设计 微信商城小程序-商品基本信息表

MySQL数据库设计 微信商城小程序-商品参数表

MySQL数据库设计 微信商城小程序-商品货品表

MySQL数据库设计 微信商城小程序-商品规格表

MySQL数据库设计 微信商城小程序-团购

MySQL数据库设计 微信商城小程序-团购规则

MySQL数据库设计 微信商城小程序-常见问题表

MySQL数据库设计 微信商城小程序-关键字表



回到顶部 ↑