ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 数据字典 ```sql /* Navicat MySQL Data Transfer Source Server : 127.0.0.1_3306 Source Server Version : 50714 Source Host : 127.0.0.1:3306 Source Database : fansunion Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2017-5-21 16:39:14 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `fn_admin` -- ---------------------------- DROP TABLE IF EXISTS `fn_admin`; CREATE TABLE `fn_admin` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '管理员用户ID', `nickname` char(16) NOT NULL DEFAULT '' COMMENT '昵称', `avatar` varchar(500) NOT NULL DEFAULT '' COMMENT '头像', `password` char(40) NOT NULL DEFAULT '' COMMENT '用户密码', `salt` char(32) NOT NULL DEFAULT '' COMMENT '用于保护用户密码安全的盐值', -- 这个用户邮箱和手机是唯一的,但是有的人开始并没有绑定邮箱或手机,所以也不能为空串,不然唯一冲突,所以只能允许为空null了,并且默认为null `email` char(32) NULL DEFAULT NULL COMMENT '用户邮箱(可用作登录名)', `mobile` char(15) NULL DEFAULT NULL COMMENT '用户手机(可用作登录名)', `login` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '登录次数', `create_ip` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '注册IP', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '注册时间', `last_login_ip` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '最后登录IP', `last_login_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '最后登录时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态', PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) USING BTREE, UNIQUE KEY `mobile` (`mobile`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='管理员 表'; -- ---------------------------- -- Records of fn_admin -- ---------------------------- -- ---------------------------- -- Table structure for `fn_flow_user` -- ---------------------------- DROP TABLE IF EXISTS `fn_flow_user`; CREATE TABLE `fn_flow_user` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '流量主ID', `nickname` char(16) NOT NULL DEFAULT '' COMMENT '昵称', `avatar` varchar(500) NOT NULL DEFAULT '' COMMENT '头像', `contact_name` char(16) NOT NULL DEFAULT '' COMMENT '联系人姓名', `contact_mobile` char(16) NOT NULL DEFAULT '' COMMENT '联系人手机', `password` char(40) NOT NULL DEFAULT '' COMMENT '用户密码', `salt` char(32) NOT NULL DEFAULT '' COMMENT '用于保护用户密码安全的盐值', -- 这个用户邮箱和手机是唯一的,但是有的人开始并没有绑定邮箱或手机,所以也不能为空串,不然唯一冲突,所以只能允许为空null了,并且默认为null `email` char(32) NULL DEFAULT NULL COMMENT '用户邮箱(可用作登录名)', `mobile` char(15) NULL DEFAULT NULL COMMENT '用户手机(可用作登录名)', `login` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '登录次数', `create_ip` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '注册IP', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '注册时间', `last_login_ip` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '最后登录IP', `last_login_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '最后登录时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', `balance` decimal(10,2) DEFAULT 0.00 COMMENT '账户余额', `not_balance` decimal(10,2) DEFAULT 0.00 COMMENT '不可用余额(暂不可用余额,比如提现时等等情况,有时可能需要冻结一部分余额)', `push_total_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '流量主累计推送总数量(人次)(推送成功的)', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态', PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) USING BTREE, UNIQUE KEY `mobile` (`mobile`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='流量主用户 表'; -- ---------------------------- -- Records of fn_flow_user -- ---------------------------- -- ---------------------------- -- Table structure for `fn_advertisers` -- ---------------------------- DROP TABLE IF EXISTS `fn_advertisers`; CREATE TABLE `fn_advertisers` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '广告商ID', `name` char(16) NOT NULL DEFAULT '' COMMENT '广告商名称', `logo` varchar(500) NOT NULL DEFAULT '' COMMENT '广告商logo', `contact_name` char(16) NOT NULL DEFAULT '' COMMENT '联系人姓名', `contact_mobile` char(16) NOT NULL DEFAULT '' COMMENT '联系人手机', `password` char(40) NOT NULL DEFAULT '' COMMENT '用户密码', `salt` char(32) NOT NULL DEFAULT '' COMMENT '用于保护用户密码安全的盐值', -- 这个用户邮箱和手机是唯一的,但是有的人开始并没有绑定邮箱或手机,所以也不能为空串,不然唯一冲突,所以只能允许为空null了,并且默认为null `email` char(32) NULL DEFAULT NULL COMMENT '用户邮箱(可用作登录名)', `mobile` char(15) NULL DEFAULT NULL COMMENT '用户手机(可用作登录名)', `login` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '登录次数', `create_ip` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '注册IP', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '注册时间', `last_login_ip` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '最后登录IP', `last_login_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '最后登录时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', `balance` decimal(10,2) DEFAULT 0.00 COMMENT '账户余额', `not_balance` decimal(10,2) DEFAULT 0.00 COMMENT '不可用余额(暂不可用余额,比如提现时,投放广告时等等情况,有时可能需要冻结一部分余额)', `push_total_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '广告商累计推送总数量(人次)(推送成功的)', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态', PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) USING BTREE, UNIQUE KEY `mobile` (`mobile`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='广告商用户 表'; -- ---------------------------- -- Records of fn_advertisers -- ---------------------------- -- ---------------------------- -- Table structure for `fn_wechat_account` -- ---------------------------- DROP TABLE IF EXISTS `fn_wechat_account`; CREATE TABLE `fn_wechat_account` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `flow_user_id` int(10) unsigned NOT NULL COMMENT '所属流量主用户ID', `name` varchar(250) NOT NULL DEFAULT '' COMMENT '公众号名称', `account` varchar(250) NOT NULL DEFAULT '' COMMENT '微信帐号', `app_id` varchar(250) NOT NULL DEFAULT '' COMMENT 'AppId', `app_secret` varchar(250) NOT NULL DEFAULT '' COMMENT 'AppSecret', `token` varchar(250) NOT NULL DEFAULT '' COMMENT '随机生成token', `original` varchar(250) NOT NULL DEFAULT '' COMMENT '原始ID', `auth_refresh_token` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '自动更新的token码', `is_certification` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否认证:1-未认证,2-已认证', `account_type` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '账号类型:1-订阅号,2-服务号', `service_remaining_push_num` tinyint(1) unsigned NOT NULL DEFAULT 4 COMMENT '服务号当月剩余推送次数', `subscribe_remaining_push_num` tinyint(1) unsigned NOT NULL DEFAULT 1 COMMENT '订阅号当日剩余推送次数', `lastupdate` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '最后触发时间', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', `push_total_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公众号累计推送总数量(人次)(推送成功的)', `fans_num` int(10) unsigned NOT NULL COMMENT '粉丝数量', `status` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '状态', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='公众号 表'; -- ---------------------------- -- Records of fn_wechat_account -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_push_record` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_push_record`; CREATE TABLE `fn_ad_push_record` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `wechat_account_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公众号ID', `create_day` varchar(9) NOT NULL DEFAULT '' COMMENT '日期:2017-5-21', `results` text NULL COMMENT '推送结果(分析接口数据,很重要,可以统计发现推送失败的原因)', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '推送状态:1-推送成功,2-推送失败', `create_time` int(10) unsigned NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='公众号广告推送记录 表'; -- ---------------------------- -- Records of fn_ad_push_record -- ---------------------------- -- ---------------------------- -- Table structure for `fn_pull_fans_record` -- ---------------------------- DROP TABLE IF EXISTS `fn_pull_fans_record`; CREATE TABLE `fn_pull_fans_record` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `wechat_account_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公众号ID', `results` text NULL COMMENT '拉取结果', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '拉取状态:1-拉取成功,2-拉取失败', `create_time` int(10) unsigned NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='公众号粉丝拉取记录 表(报名前的一个小时内系统强制公众号必须拉取一次粉丝数量,这个报名时间是实际操作报名时间,而不是报名开始或结束时间)'; -- ---------------------------- -- Records of fn_pull_fans_record -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_period` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_period`; CREATE TABLE `fn_ad_period` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `ad_period_no` varchar(250) NOT NULL DEFAULT '' COMMENT '广告期号:201752100001(Ymd+今日第几次广告)', `fens_threshold` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '粉丝门槛,如粉丝数必须达到10万以上的公众号才可以参加,0-为不限制', `account_type` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '账号类型,0-不限,1-仅服务号,2-仅公众号', `price` text NULL DEFAULT NULL COMMENT '每个广告位的定价(16个广告位),json数据:{"p-1":12,……}', `publisher` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '发布者,0-平台,1-公众号,2-广告商', `publisher_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '发布者ID', `wechat_account_participate_start_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公众号报名-开始时间', `wechat_account_participate_end_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公众号报名-结束时间', `advertisers_participate_start_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '广告商报名/投放-开始时间', `advertisers_participate_end_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '广告商报名/投放-结束时间', `act_survival_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '操作截止时间', `push_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '广告确定的发布/推送时间', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态,0-创建,1-公众号正在报名,2-公众号报名结束/广告商报名、投放开始,3-广告商报名、投放时间结束/公众号自由时间开始,3-公众号自由时间结束/广告商自由时间开始,4-广告商自由时间结束/操作截止时间/锁定时间开始(锁定中,待发布),5-进入发布过程,6-发布失败,7-发布成功,8-已完成', PRIMARY KEY (`id`), KEY `status` (`status`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='广告排期 表'; -- ---------------------------- -- Records of fn_ad_period -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_advertisers_participate` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_advertisers_participate`; CREATE TABLE `fn_ad_advertisers_participate` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ad_period_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告期ID', `advertisers_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '广告商ID', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态', `create_time` int(10) unsigned NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='广告商:每期广告的参与记录 表'; -- ---------------------------- -- Records of fn_ad_advertisers_participate -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_wechat_account_participate` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_wechat_account_participate`; CREATE TABLE `fn_ad_wechat_account_participate` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ad_period_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告期ID', `wechat_account_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公众号ID', `current_fans_num` int(10) unsigned NOT NULL COMMENT '当前粉丝数量(很重要,收益就是用这个粉丝数量的)', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态', `create_time` int(10) unsigned NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='公众号:每期广告的参与记录 表'; -- ---------------------------- -- Records of fn_ad_wechat_account_participate -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_advertisers_shielding_wechat_account` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_advertisers_shielding_wechat_account`; CREATE TABLE `fn_ad_advertisers_shielding_wechat_account` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ad_period_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告期ID', `position` tinyint(2) unsigned NOT NULL DEFAULT 0 COMMENT '广告位置:1~16,1~8是订阅号的,9~16是服务号的', `advertisers_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '广告商ID', `wechat_account_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公众号ID', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态', `create_time` int(10) unsigned NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='广告商:每期广告 某个广告(位)想要 屏蔽的公众号 表'; -- ---------------------------- -- Records of fn_ad_advertisers_shielding_wechat_account -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_wechat_account_shielding_advertisers` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_wechat_account_shielding_advertisers`; CREATE TABLE `fn_ad_wechat_account_shielding_advertisers` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ad_period_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告期ID', `position` tinyint(2) unsigned NOT NULL DEFAULT 0 COMMENT '广告位置:1~16,1~8是订阅号的,9~16是服务号的', `advertisers_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '广告商ID', `wechat_account_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公众号ID', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态', `create_time` int(10) unsigned NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='公众号:每期广告 想要 屏蔽的某个广告位 表'; -- ---------------------------- -- Records of fn_ad_wechat_account_shielding_advertisers -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_copy` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_copy`; CREATE TABLE `fn_ad_copy` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `advertisers_id` int(10) unsigned NOT NULL COMMENT '所属广告商ID', `name` varchar(250) NOT NULL DEFAULT '' COMMENT '名称(标题)', `img` varchar(250) NOT NULL DEFAULT '' COMMENT '微缩图', `author` varchar(250) NOT NULL DEFAULT '' COMMENT '作者', `original_url` varchar(250) NOT NULL DEFAULT '' COMMENT '阅读原文的url', `is_original` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '是否原创,0-原创,1-转载', `abstract` text NULL COMMENT '摘要', `content` longtext NULL COMMENT '内容', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态,0-未使用,1-已使用(已经用过了的文案被锁定不能再使用了,且不能再被修改了,只能读不能写)', PRIMARY KEY (`id`), KEY `status` (`status`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='广告文案 表'; -- ---------------------------- -- Records of fn_ad_copy -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_position_content` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_position_content`; CREATE TABLE `fn_ad_position_content` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ad_period_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告期ID', `advertisers_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告商ID', `ad_copy_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所用广告文案ID', -- 文本的要设置为允许为空,因为它不能设置默认值(实际上默认值就是NULL),如果插入数据时没有值会报错的(没有值时就用缺省值,而缺省值就是默认值) `content` longtext NULL COMMENT '广告内容,json的结构数据', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='投放的广告位内容 表'; -- ---------------------------- -- Records of fn_ad_position_content -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_position` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_advertisers_effect`; CREATE TABLE `fn_ad_position` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ad_period_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告期ID', `advertisers_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告商ID', `ad_position_content_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '对应广告位内容ID', `position` tinyint(2) unsigned NOT NULL DEFAULT 0 COMMENT '广告位置:1~16,1~8是订阅号的,9~16是服务号的', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `price` decimal(10,2) DEFAULT 0.00 COMMENT '单价', `estimate_fee` decimal(10,2) DEFAULT 0.00 COMMENT '预计费用', `actual_fee` decimal(10,2) DEFAULT 0.00 COMMENT '实际费用', `push_account_total_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '(将要)推送的公众号总数量', `push_account_success_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送的公众号成功数量', `push_account_fail_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送的公众号失败数量', `push_total_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '(将要)推送的消息总数量', `push_success_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送的消息成功数量', `push_fail_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送的消息失败数量', `status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '状态,0-待推送,1-已推送', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='广告商:投放的广告位-效果(报表) 表'; -- ---------------------------- -- Records of fn_ad_position -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_advertisers_effect_item` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_advertisers_effect_item`; CREATE TABLE `fn_ad_advertisers_effect_item` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ad_advertisers_effect_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属效果报表ID', `wechat_account_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送此条消息的公众号ID', `push_record_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送记录详情ID', `position` tinyint(2) unsigned NOT NULL DEFAULT 0 COMMENT '广告位置:1~16,1~8是订阅号的,9~16是服务号的', `price` decimal(10,2) DEFAULT 0.00 COMMENT '单价', `estimate_fee` decimal(10,2) DEFAULT 0.00 COMMENT '预计费用', `actual_fee` decimal(10,2) DEFAULT 0.00 COMMENT '实际费用', `push_fans_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送粉丝数量(就是公众号的粉丝数量,理论上消息推送就推送给全部粉丝了)', `push_status` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送状态:1-推送成功,2-推送失败(推送失败不计费)(这个推送状态只能知道公众号的推送状态,不能保证公众号的每个粉丝一定能收的到,这个式微信决定的)', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='广告商:效果报表-条目 表'; -- ---------------------------- -- Records of fn_ad_advertisers_effect_item -- ---------------------------- -- ---------------------------- -- Table structure for `fn_ad_wechat_account_effect` -- ---------------------------- DROP TABLE IF EXISTS `fn_ad_wechat_account_effect`; CREATE TABLE `fn_ad_wechat_account_effect` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ad_period_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告期ID', `ad_position_content_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '对应广告位内容ID', `advertisers_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所属广告商ID', `wechat_account_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送此条消息的公众号ID', `push_record_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送记录详情ID', `position` tinyint(2) unsigned NOT NULL DEFAULT 0 COMMENT '广告位置:1~16,1~8是订阅号的,9~16是服务号的', `price` decimal(10,2) DEFAULT 0.00 COMMENT '单价', `estimate_earnings` decimal(10,2) DEFAULT 0.00 COMMENT '预计收益', `actual_earnings` decimal(10,2) DEFAULT 0.00 COMMENT '实际收益', `push_fans_num` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送粉丝数量(就是公众号的粉丝数量)', `push_status` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '推送状态:0-待推送,1-推送成功,2-推送失败(推送失败不计费)', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='公众号:广告位效果(收益)表'; -- ---------------------------- -- Records of fn_ad_wechat_account_effect -- ---------------------------- -- ---------------------------- -- Table structure for `fn_advertisers_withdrawals` -- ---------------------------- DROP TABLE IF EXISTS `fn_advertisers_withdrawals`; CREATE TABLE `fn_advertisers_withdrawals` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `advertisers_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '广告商id', `title` varchar(250) NOT NULL DEFAULT '' COMMENT '标题', `content` text NULL COMMENT '申请说明', `amount` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '提现金额', `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态:0-申请(待处理),1-已完成(同意),2-驳回', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='广告商提现记录 表'; -- ---------------------------- -- Records of fn_advertisers_withdrawals -- ---------------------------- -- ---------------------------- -- Table structure for `fn_flow_user_withdrawals` -- ---------------------------- DROP TABLE IF EXISTS `fn_flow_user_withdrawals`; CREATE TABLE `fn_flow_user_withdrawals` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `flow_user_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '流量主id', `title` varchar(250) NOT NULL DEFAULT '' COMMENT '标题', `content` text NULL COMMENT '申请说明', `amount` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '提现金额', `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态:0-申请(待处理),1-已完成(同意),2-驳回', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='流量主提现记录 表'; -- ---------------------------- -- Records of fn_flow_user_withdrawals -- ---------------------------- -- 财务管理太复杂了,先做到提现这一步吧 -- ---------------------------- -- Table structure for `fn_recharge_order` -- ---------------------------- DROP TABLE IF EXISTS `fn_recharge_order`; CREATE TABLE `fn_recharge_order` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `title` varchar(250) NOT NULL DEFAULT '' COMMENT '标题(XXX充值)', `amount` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '金额', `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态:0-待支付,1-已支付(已完成)', `notice_results` text NULL COMMENT '微信支付服务器返回的支付通知结果', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='【系统】充值 订单表(先只做接微信支付)'; -- ---------------------------- -- Records of fn_recharge_order -- ---------------------------- -- ---------------------------- -- Table structure for `fn_pay_money_order` -- ---------------------------- DROP TABLE IF EXISTS `fn_pay_money_order`; CREATE TABLE `fn_pay_money_order` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `title` varchar(250) NOT NULL DEFAULT '' COMMENT '标题(XXX充值)', `amount` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '金额', `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态:0-发起,1-已 打款(已完成)', `notice_results` text NULL COMMENT '微信支付服务器返回的支付通知结果', `create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='【系统】打款 订单表(先只做接微信支付)(同意用户提现时由管理员用户发起的,检测到重复支付退款时由系统发起的)'; -- ---------------------------- -- Records of fn_pay_money_order -- ---------------------------- ``` last update:2017-5-22 18:47:22