· 5 years ago · Mar 07, 2020, 06:32 PM
1CREATE TABLE IF NOT EXISTS `znote` (
2 `id` int(10) NOT NULL AUTO_INCREMENT,
3 `version` varchar(30) NOT NULL COMMENT 'Znote AAC version',
4 `installed` int(10) NOT NULL,
5 `cached` int(11) DEFAULT NULL,
6 PRIMARY KEY (`id`)
7) ENGINE=InnoDB;
8
9CREATE TABLE IF NOT EXISTS `znote_accounts` (
10 `id` int(11) NOT NULL AUTO_INCREMENT,
11 `account_id` int(11) NOT NULL,
12 `ip` bigint(20) UNSIGNED NOT NULL,
13 `created` int(10) NOT NULL,
14 `points` int(10) DEFAULT 0,
15 `cooldown` int(10) DEFAULT 0,
16 `active` tinyint(4) NOT NULL DEFAULT '0',
17 `active_email` tinyint(4) NOT NULL DEFAULT '0',
18 `activekey` int(11) NOT NULL DEFAULT '0',
19 `flag` varchar(20) NOT NULL,
20 `secret` char(16) DEFAULT NULL,
21 PRIMARY KEY (`id`)
22) ENGINE=InnoDB;
23
24CREATE TABLE IF NOT EXISTS `znote_news` (
25 `id` int(11) NOT NULL AUTO_INCREMENT,
26 `title` varchar(30) NOT NULL,
27 `text` text NOT NULL,
28 `date` int(11) NOT NULL,
29 `pid` int(11) NOT NULL,
30 PRIMARY KEY (`id`)
31) ENGINE=InnoDB;
32
33CREATE TABLE IF NOT EXISTS `znote_images` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `title` varchar(30) NOT NULL,
36 `desc` text NOT NULL,
37 `date` int(11) NOT NULL,
38 `status` int(11) NOT NULL,
39 `image` varchar(30) NOT NULL,
40 `account_id` int(11) NOT NULL,
41 PRIMARY KEY (`id`)
42) ENGINE=InnoDB;
43
44CREATE TABLE IF NOT EXISTS `znote_paypal` (
45 `id` int(11) NOT NULL AUTO_INCREMENT,
46 `txn_id` varchar(30) NOT NULL,
47 `email` varchar(255) NOT NULL,
48 `accid` int(11) NOT NULL,
49 `price` int(11) NOT NULL,
50 `points` int(11) NOT NULL,
51 PRIMARY KEY (`id`)
52) ENGINE=InnoDB;
53
54CREATE TABLE IF NOT EXISTS `znote_paygol` (
55 `id` int(11) NOT NULL AUTO_INCREMENT,
56 `account_id` int(11) NOT NULL,
57 `price` int(11) NOT NULL,
58 `points` int(11) NOT NULL,
59 `message_id` varchar(255) NOT NULL,
60 `service_id` varchar(255) NOT NULL,
61 `shortcode` varchar(255) NOT NULL,
62 `keyword` varchar(255) NOT NULL,
63 `message` varchar(255) NOT NULL,
64 `sender` varchar(255) NOT NULL,
65 `operator` varchar(255) NOT NULL,
66 `country` varchar(255) NOT NULL,
67 `currency` varchar(255) NOT NULL,
68 PRIMARY KEY (`id`)
69) ENGINE=InnoDB;
70
71CREATE TABLE IF NOT EXISTS `znote_players` (
72 `id` int(11) NOT NULL AUTO_INCREMENT,
73 `player_id` int(11) NOT NULL,
74 `created` int(11) NOT NULL,
75 `hide_char` tinyint(4) NOT NULL,
76 `comment` varchar(255) NOT NULL,
77 PRIMARY KEY (`id`)
78) ENGINE=InnoDB;
79
80CREATE TABLE IF NOT EXISTS `znote_player_reports` (
81 `id` int(11) NOT NULL AUTO_INCREMENT,
82 `name` varchar(50) NOT NULL,
83 `posx` int(6) NOT NULL,
84 `posy` int(6) NOT NULL,
85 `posz` int(6) NOT NULL,
86 `report_description` VARCHAR(255) NOT NULL,
87 `date` INT(11) NOT NULL,
88 `status` TINYINT(3) NOT NULL DEFAULT '0',
89 PRIMARY KEY (`id`)
90) ENGINE=InnoDB;
91
92CREATE TABLE IF NOT EXISTS `znote_changelog` (
93 `id` int(11) NOT NULL AUTO_INCREMENT,
94 `text` VARCHAR(255) NOT NULL,
95 `time` INT(11) NOT NULL,
96 `report_id` INT(11) NOT NULL,
97 `status` TINYINT(3) NOT NULL DEFAULT '0',
98 PRIMARY KEY (`id`)
99) ENGINE=InnoDB;
100
101CREATE TABLE IF NOT EXISTS `znote_shop` (
102 `id` int(11) NOT NULL AUTO_INCREMENT,
103 `type` int(11) NOT NULL,
104 `itemid` int(11) DEFAULT NULL,
105 `count` int(11) NOT NULL DEFAULT '1',
106 `description` varchar(255) NOT NULL,
107 `points` int(11) NOT NULL DEFAULT '10',
108 PRIMARY KEY (`id`)
109) ENGINE=InnoDB;
110
111CREATE TABLE IF NOT EXISTS `znote_shop_logs` (
112 `id` int(11) NOT NULL AUTO_INCREMENT,
113 `account_id` int(11) NOT NULL,
114 `player_id` int(11) NOT NULL,
115 `type` int(11) NOT NULL,
116 `itemid` int(11) NOT NULL,
117 `count` int(11) NOT NULL,
118 `points` int(11) NOT NULL,
119 `time` int(11) NOT NULL,
120 PRIMARY KEY (`id`)
121) ENGINE=InnoDB;
122
123CREATE TABLE IF NOT EXISTS `znote_shop_orders` (
124 `id` int(11) NOT NULL AUTO_INCREMENT,
125 `account_id` int(11) NOT NULL,
126 `type` int(11) NOT NULL,
127 `itemid` int(11) NOT NULL,
128 `count` int(11) NOT NULL,
129 `time` int(11) NOT NULL DEFAULT '0',
130 PRIMARY KEY (`id`)
131) ENGINE=InnoDB;
132
133CREATE TABLE IF NOT EXISTS `znote_visitors` (
134 `id` int(11) NOT NULL AUTO_INCREMENT,
135 `ip` bigint(20) NOT NULL,
136 `value` int(11) NOT NULL,
137 PRIMARY KEY (`id`)
138) ENGINE=InnoDB;
139
140CREATE TABLE IF NOT EXISTS `znote_visitors_details` (
141 `id` int(11) NOT NULL AUTO_INCREMENT,
142 `ip` bigint(20) NOT NULL,
143 `time` int(11) NOT NULL,
144 `type` tinyint(4) NOT NULL,
145 `account_id` int(11) NOT NULL,
146 PRIMARY KEY (`id`)
147) ENGINE=InnoDB;