CREATE TABLE `qimall_addons_clockin_apply` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mall_id` int(10) DEFAULT '0' COMMENT '商城ID', `user_id` int(10) DEFAULT '0' COMMENT '会员ID', `pic` text COMMENT '截图照片', `is_pass` tinyint(1) NOT NULL DEFAULT '0' COMMENT '审核状态[0审核中 1审核通过 -1拒绝]', `reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励', `reason` tinytext COMMENT '拒绝原因', `remark` varchar(255) DEFAULT '' COMMENT '用户备注', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[0禁用 1启用 -1删除]', `created_at` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`) USING BTREE, KEY `user_id` (`user_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='打卡申请表'; CREATE TABLE `qimall_addons_clockin_reward_log` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mall_id` int(10) DEFAULT '0' COMMENT '商城ID', `user_id` int(10) DEFAULT '0' COMMENT '会员ID', `apply_id` int(10) DEFAULT '0' COMMENT '关联clockin_apply.id', `reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[0禁用 1启用 -1删除]', `created_at` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`) USING BTREE, KEY `user_id` (`user_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='打卡奖励记录表'; CREATE TABLE `qimall_addons_clockin_user` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mall_id` int(10) DEFAULT '0' COMMENT '商城ID', `user_id` int(10) DEFAULT '0' COMMENT '会员ID', `total_reward` decimal(10,2) DEFAULT '0.00' COMMENT '总奖励', `apply_num` int(10) DEFAULT '0' COMMENT '申请次数', `success_num` int(10) DEFAULT '0' COMMENT '打卡成功次数', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[0禁用 1启用 -1删除]', `created_at` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`) USING BTREE, KEY `user_id` (`user_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='打卡用户表';