Hope
Premium
- Сообщения
- 48,321
- Решения
- 22
- Реакции
- 71,966
- Баллы
- 40,905
:-D Беда...
Это на всякий случай, вдруг ещё что-то попросит:
Код:
CREATE TABLE IF NOT EXISTS `xf_credits_currency` (
`currency_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
`description` text NOT NULL,
`column` varchar(100) NOT NULL,
`code` text NOT NULL,
`symbol_left` varchar(50) NOT NULL,
`symbol_right` varchar(50) NOT NULL,
`decimal_place` tinyint(2) unsigned NOT NULL DEFAULT '0',
`negative_handle` enum('reset','hide','show') NOT NULL DEFAULT 'show',
`user_groups` mediumblob NOT NULL,
`max_time` int(10) unsigned NOT NULL DEFAULT '0',
`earn_max` decimal(19,4) NOT NULL DEFAULT '0.0000',
`in_bound` tinyint(3) unsigned NOT NULL DEFAULT '1',
`out_bound` tinyint(3) unsigned NOT NULL DEFAULT '1',
`value` decimal(19,4) unsigned NOT NULL DEFAULT '0.0000',
`withdraw` tinyint(3) unsigned NOT NULL DEFAULT '0',
`withdraw_min` decimal(19,4) unsigned NOT NULL DEFAULT '0.0000',
`withdraw_max` decimal(19,4) unsigned NOT NULL DEFAULT '0.0000',
`display_order` int(10) unsigned NOT NULL DEFAULT '0',
`active` tinyint(3) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`currency_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Это на всякий случай, вдруг ещё что-то попросит:
Код:
CREATE TABLE IF NOT EXISTS `xf_credits_event` (
`event_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`action_id` varchar(100) NOT NULL,
`currency_id` int(10) unsigned NOT NULL DEFAULT '0',
`user_groups` mediumblob NOT NULL,
`forums` mediumblob NOT NULL,
`amount` decimal(19,4) NOT NULL DEFAULT '0.0000',
`sub_amount` decimal(19,4) NOT NULL DEFAULT '0.0000',
`multiplier` decimal(19,4) NOT NULL DEFAULT '0.0000',
`sub_multiplier` decimal(19,4) NOT NULL DEFAULT '0.0000',
`active` tinyint(3) unsigned NOT NULL DEFAULT '1',
`moderate` tinyint(3) unsigned NOT NULL DEFAULT '0',
`alert` tinyint(3) unsigned NOT NULL DEFAULT '0',
`times` int(10) unsigned NOT NULL DEFAULT '1',
`max_time` int(10) unsigned NOT NULL DEFAULT '0',
`apply_max` int(10) unsigned NOT NULL DEFAULT '0',
`extra_min` decimal(19,4) NOT NULL DEFAULT '0.0000',
`extra_max` decimal(19,4) NOT NULL DEFAULT '0.0000',
`extra_min_handle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`target` enum('user','user_action','both') NOT NULL DEFAULT 'user',
PRIMARY KEY (`event_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Код:
CREATE TABLE IF NOT EXISTS `xf_credits_paypal_log` (
`payment_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL DEFAULT '0',
`processor` varchar(25) NOT NULL,
`transaction_id` varchar(50) NOT NULL,
`transaction_type` enum('payment','cancel','info','error') NOT NULL,
`message` varchar(255) NOT NULL DEFAULT '',
`transaction_details` mediumblob NOT NULL,
`log_date` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`payment_log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Код:
CREATE TABLE IF NOT EXISTS `xf_credits_stats` (
`action_id` varchar(50) NOT NULL,
`total_earn` decimal(19,4) NOT NULL DEFAULT '0.0000',
`total_spend` decimal(19,4) NOT NULL DEFAULT '0.0000',
`start_date` int(10) unsigned NOT NULL DEFAULT '0',
`stats_date` int(10) unsigned NOT NULL DEFAULT '0',
`currency_id` int(10) unsigned NOT NULL,
`stats_type` varchar(30) NOT NULL DEFAULT '',
PRIMARY KEY (`action_id`,`currency_id`,`stats_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Код:
CREATE TABLE IF NOT EXISTS `xf_credits_transaction` (
`transaction_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`action_id` varchar(100) NOT NULL,
`event_id` int(10) unsigned NOT NULL DEFAULT '0',
`currency_id` int(10) unsigned NOT NULL DEFAULT '0',
`user_id` int(10) unsigned NOT NULL DEFAULT '0',
`user_action_id` int(10) unsigned NOT NULL DEFAULT '0',
`content_id` int(10) unsigned NOT NULL DEFAULT '0',
`content_type` varchar(25) NOT NULL DEFAULT '',
`owner_id` int(10) unsigned NOT NULL DEFAULT '0',
`multiplier` int(10) unsigned NOT NULL DEFAULT '0',
`transaction_date` int(10) NOT NULL DEFAULT '0',
`amount` double NOT NULL DEFAULT '0',
`negate` tinyint(1) unsigned NOT NULL DEFAULT '0',
`message` text NOT NULL,
`moderate` tinyint(3) unsigned NOT NULL DEFAULT '0',
`is_revert` tinyint(3) unsigned NOT NULL DEFAULT '0',
`transaction_state` varchar(30) NOT NULL,
`extra_data` mediumblob NOT NULL COMMENT 'Serialized. Stores any extra data relevant to the transaction',
PRIMARY KEY (`transaction_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;