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

MySQL建表SQL语句

数据库结构:商城系统-优惠券发放记录表:https://open.yesapi.cn/tablelist/yesapi_yshopmall_yx_store_coupon_user.html


-- 数据库大全:商城系统-优惠券发放记录表
-- 来源:YesApi.cn
CREATE TABLE `yesapi_yshopmall_yx_store_coupon_user` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `cid` int(10) NULL DEFAULT '0' COMMENT '兑换的项目id',
    `uid` bigint(20) NULL DEFAULT '0' COMMENT '优惠券所属用户',
    `coupon_title` varchar(32) NULL COMMENT '优惠券名称',
    `coupon_price` decimal(8,2) unsigned NULL DEFAULT '0.00' COMMENT '优惠券的面值',
    `use_min_price` decimal(8,2) unsigned NULL DEFAULT '0.00' COMMENT '最低消费多少金额可用优惠券',
    `create_time` datetime NULL COMMENT '优惠券创建时间',
    `end_time` datetime NULL COMMENT '优惠券结束时间',
    `use_time` datetime NULL COMMENT '使用时间',
    `yesapi_yshopmall_yx_store_coupon_user_type` varchar(32) NULL DEFAULT 'send' COMMENT '获取方式',
    `yesapi_yshopmall_yx_store_coupon_user_status` tinyint(1) NULL DEFAULT '0' COMMENT '状态(0:未使用,1:已使用, 2:已过期)',
    `is_fail` tinyint(3) NULL DEFAULT '0' COMMENT '是否有效',
    `is_del` tinyint(1) NULL DEFAULT '0' COMMENT '',
    KEY `cid` (`cid`),
    KEY `uid` (`uid`),
    KEY `create_time` (`create_time`),
    KEY `end_time` (`end_time`),
    KEY `yesapi_yshopmall_yx_store_coupon_user_status` (`yesapi_yshopmall_yx_store_coupon_user_status`),
    KEY `is_fail` (`is_fail`),
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '商城系统-优惠券发放记录表';

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


MySQL数据库表结构设计

第 1-12 条, 共 12 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
cidint(10)0兑换的项目id普通索引0
uidbigint(20)0优惠券所属用户普通索引0
coupon_titlevarchar(32)优惠券名称无索引
coupon_pricedecimal(8,2) unsigned0.00优惠券的面值无索引0.00
use_min_pricedecimal(8,2) unsigned0.00最低消费多少金额可用优惠券无索引0.00
create_timedatetime优惠券创建时间普通索引
end_timedatetime优惠券结束时间普通索引
use_timedatetime使用时间无索引
yesapi_yshopmall_yx_store_coupon_user_typevarchar(32)send获取方式无索引send
yesapi_yshopmall_yx_store_coupon_user_statustinyint(1)0状态(0:未使用,1:已使用, 2:已过期)普通索引0
is_failtinyint(3)0是否有效普通索引0
is_deltinyint(1)0无索引0

猜你喜欢

MySQL数据库设计 商城系统-支付宝配置类

MySQL数据库设计 商城系统-代码生成字段信息存储

MySQL数据库设计 商城系统-部门

MySQL数据库设计 商城系统-数据字典

MySQL数据库设计 商城系统-数据字典详情

MySQL数据库设计 商城系统-邮箱配置

MySQL数据库设计 商城系统-代码生成器配置

MySQL数据库设计 商城系统-代码生成测试

MySQL数据库设计 商城系统-岗位

MySQL数据库设计 商城系统-本地存储

MySQL数据库设计 商城系统-系统日志

MySQL数据库设计 商城系统-菜单

MySQL数据库设计 商城系统-Sm.Ms图床

MySQL数据库设计 商城系统-七牛云配置

MySQL数据库设计 商城系统-七牛云文件存储

MySQL数据库设计 商城系统-定时任务

MySQL数据库设计 商城系统-定时任务日志

MySQL数据库设计 商城系统-角色表

MySQL数据库设计 商城系统-角色部门关联

MySQL数据库设计 商城系统-角色菜单关联



回到顶部 ↑