· 5 years ago · Jul 07, 2020, 10:10 AM
1CREATE TABLE IF NOT EXISTS `fanclubCamfeed` (`id` int(10) NOT NULL AUTO_INCREMENT,`performerId` int(10) NOT NULL,`type` int(10) NOT NULL,`description` varchar(255) DEFAULT NULL,`width` int(10) NOT NULL,`height` int(10) NOT NULL,`createDate` datetime NOT NULL,`access` int(2) NOT NULL,`duration` int(10) NOT NULL,`status` int(10) DEFAULT '0',PRIMARY KEY (`id`),KEY `performerId` (`performerId`));
2
3CREATE TABLE IF NOT EXISTS `fanclubCamfeedComments` (`cid` int(10) NOT NULL AUTO_INCREMENT,`feedId` int(10) NOT NULL,`senderId` int(10) NOT NULL,`senderType` int(10) NOT NULL,`text` varchar(255) DEFAULT NULL,`createDate` datetime DEFAULT NULL,`access` int(10) DEFAULT NULL,PRIMARY KEY (`cid`),KEY `feedId` (`feedId`));
4
5CREATE TABLE IF NOT EXISTS `fanclubCamfeedLikes` (`id` int(10) NOT NULL AUTO_INCREMENT,`feedId` int(10) NOT NULL,`customerId` int(10) NOT NULL DEFAULT '0',`customerIp` bigint(20) NOT NULL DEFAULT '0',PRIMARY KEY (`id`),UNIQUE KEY `customerIp` (`feedId`,`customerIp`),KEY `feedId` (`feedId`),KEY `customerId` (`customerId`));
6
7CREATE TABLE IF NOT EXISTS `fanclubCustomerShows` (`customer` int(10) DEFAULT NULL,`showId` int(10) DEFAULT NULL,`type` int(11) NOT NULL,`performer` int(10) DEFAULT NULL,UNIQUE KEY `entry` (`customer`,`showId`),KEY `cp` (`customer`,`performer`));
8
9CREATE TABLE IF NOT EXISTS `fanclubDiaries` (`id` int(10) NOT NULL AUTO_INCREMENT,`performerId` int(10) NOT NULL,`title` varchar(255) NOT NULL,`description` text NOT NULL,`createDate` datetime NOT NULL,`publishDate` datetime NOT NULL,`access` int(2) NOT NULL,`text` text,`price` double DEFAULT '0',PRIMARY KEY (`id`));
10
11
12CREATE TABLE IF NOT EXISTS `fanclubGoals` (`id` int(11) NOT NULL AUTO_INCREMENT,`performerId` int(11) NOT NULL,`currentCredits` decimal(8,2) NOT NULL,`minCredits` decimal(8,2) NOT NULL,`goalCredits` decimal(8,2) NOT NULL,`name` varchar(64) NOT NULL,`description` varchar(256) DEFAULT NULL,`startDate` datetime NOT NULL,`finishDate` datetime NOT NULL,`status` int(11) NOT NULL,PRIMARY KEY (`id`));
13
14CREATE TABLE IF NOT EXISTS `fanclubPictures` (`id` int(10) NOT NULL AUTO_INCREMENT,`setId` int(10) NOT NULL,`priority` int(10) DEFAULT NULL,`width` int(10) NOT NULL,`height` int(10) NOT NULL,PRIMARY KEY (`id`));
15
16CREATE TABLE IF NOT EXISTS `fanclubPurchases` (`id` int(10) NOT NULL AUTO_INCREMENT,`objectId` int(10) NOT NULL,`type` int(2) NOT NULL,`time` datetime NOT NULL,`amount` decimal(8,2) NOT NULL DEFAULT '0.00',`customerId` int(10) NOT NULL,`performerId` int(10) NOT NULL,`transactionId` int(10) NOT NULL,`refund` int(10) DEFAULT '0',PRIMARY KEY (`id`),UNIQUE KEY `transactionId` (`transactionId`),KEY `idx_objects` (`customerId`,`performerId`,`type`));
17
18CREATE TABLE IF NOT EXISTS `fanclubSets` (`id` int(10) NOT NULL AUTO_INCREMENT,`performerId` int(10) NOT NULL,`access` int(2) NOT NULL,`price` decimal(8,2) NOT NULL DEFAULT '0.00',`title` varchar(255) NOT NULL,`description` text NOT NULL,`createDate` datetime NOT NULL,`publishDate` datetime NOT NULL,`featuredPictureId` int(10) NOT NULL,`count` int(10) DEFAULT NULL,PRIMARY KEY (`id`),KEY `performerId` (`performerId`));
19
20CREATE TABLE IF NOT EXISTS `fanclubShows` (`id` int(10) NOT NULL AUTO_INCREMENT,`performerId` int(10) NOT NULL,`title` varchar(255) NOT NULL,`description` text NOT NULL,`createDate` datetime NOT NULL,`publishDate` datetime NOT NULL,`access` int(2) NOT NULL,`subjectId` int(10) NOT NULL,`duration` int(10) NOT NULL,`price` decimal(8,2) NOT NULL DEFAULT '0.00',`status` int(10) DEFAULT '0',PRIMARY KEY (`id`),UNIQUE KEY `subjectId` (`subjectId`),KEY `performerId` (`performerId`));
21
22CREATE TABLE IF NOT EXISTS `fanclubStoreItems` (`id` int(10) NOT NULL AUTO_INCREMENT,`performerId` int(10) NOT NULL,`access` int(2) NOT NULL,`price` decimal(8,2) NOT NULL DEFAULT '0.00',`title` varchar(255) NOT NULL,`description` text NOT NULL,`createDate` datetime NOT NULL,`publishDate` datetime NOT NULL,`type` int(10) NOT NULL,`count` int(10) DEFAULT NULL,`status` int(10) NOT NULL DEFAULT '0',PRIMARY KEY (`id`),KEY `performerId` (`performerId`));
23
24CREATE TABLE IF NOT EXISTS `fanclubVideos` (`id` int(10) NOT NULL AUTO_INCREMENT,`performerId` int(10) NOT NULL,`title` varchar(255) DEFAULT NULL,`description` varchar(255) DEFAULT NULL,`width` int(10) NOT NULL,`height` int(10) NOT NULL,`createDate` datetime NOT NULL,`publishDate` datetime NOT NULL,`access` int(2) NOT NULL,`duration` int(10) NOT NULL,`price` decimal(8,2) NOT NULL DEFAULT '0.00',`status` int(10) DEFAULT '0',PRIMARY KEY (`id`),KEY `performerId` (`performerId`));