CREATE TABLE `red_packet` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', `for_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发放对象(用户或群id)', `pay_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态:0未支付,1已支付', `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类型:1、个人,2、群普通,3、群拼手气', `intro` varchar(255) NOT NULL DEFAULT '' COMMENT '简介', `number` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '个数', `total_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.0' COMMENT '总金额', `single_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.0' COMMENT '单个红包金额(群拼手气时为0)', `return_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.0' COMMENT '退还金额', `is_cli_handle` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否经过cli退款处理:0否,1是', `expend_time` mediumint(1) unsigned NOT NULL DEFAULT '0' COMMENT '领取消耗时间', `add_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `pay_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '支付时间', PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `pay_status` (`pay_status`), KEY `pay_time` (`pay_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='红包发放表'; CREATE TABLE `red_packet_log` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `rp_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '红包id', `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '领取人id', `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.0' COMMENT '领取金额', `is_good` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否手气最佳:0否,1是', `add_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '领取时间', PRIMARY KEY (`id`), KEY `rp_id` (`rp_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='红包领取日志表';
# 引入中间状态 ALTER TABLE `red_packet` MODIFY COLUMN `pay_status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '支付状态:0未支付,1已支付,2等待到账' AFTER `for_id`, ADD COLUMN `pay_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '支付方式:0未知,1支付宝,2微信,3银联' AFTER `pay_status`, ADD COLUMN `trade_no` varchar(30) NOT NULL DEFAULT '' COMMENT '第三方支付交易号' AFTER `pay_type`; ALTER TABLE `red_packet_log` ADD COLUMN `is_into_account` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否到账:0否,1是' AFTER `is_good`;
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有