-
Notifications
You must be signed in to change notification settings - Fork 253
/
qbcore.sql
295 lines (272 loc) · 10.3 KB
/
qbcore.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
CREATE TABLE IF NOT EXISTS `apartments` (
`id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(255) DEFAULT (NULL),
`type` VARCHAR(255) DEFAULT (NULL),
`label` VARCHAR(255) DEFAULT (NULL),
`citizenid` VARCHAR(11) DEFAULT (NULL),
KEY `citizenid` (`citizenid`),
KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `bank_accounts` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`account_name` VARCHAR(50) DEFAULT (NULL),
`account_balance` INT(11) NOT NULL DEFAULT 0,
`account_type` ENUM('shared','job','gang') NOT NULL,
`users` LONGTEXT DEFAULT ('[]'),
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `account_name` (`account_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `bank_statements` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`account_name` VARCHAR(50) DEFAULT ('checking'),
`amount` INT(11) DEFAULT (NULL),
`reason` VARCHAR(50) DEFAULT (NULL),
`statement_type` ENUM('deposit','withdraw') DEFAULT (NULL),
`date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP(),
PRIMARY KEY (`id`) USING BTREE,
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `bans` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) DEFAULT (NULL),
`license` VARCHAR(50) DEFAULT (NULL),
`discord` VARCHAR(50) DEFAULT (NULL),
`ip` VARCHAR(50) DEFAULT (NULL),
`reason` TEXT DEFAULT (NULL),
`expire` INT(11) DEFAULT (NULL),
`bannedby` VARCHAR(255) NOT NULL DEFAULT 'LeBanhammer',
PRIMARY KEY (`id`),
KEY `license` (`license`),
KEY `discord` (`discord`),
KEY `ip` (`ip`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `crypto` (
`crypto` VARCHAR(50) NOT NULL DEFAULT 'qbit',
`worth` INT(11) NOT NULL DEFAULT 0,
`history` TEXT DEFAULT (NULL),
PRIMARY KEY (`crypto`)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS `crypto_transactions` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`title` VARCHAR(50) DEFAULT (NULL),
`message` VARCHAR(50) DEFAULT (NULL),
`date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP(),
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `dealers` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL DEFAULT '0',
`coords` LONGTEXT DEFAULT (NULL),
`time` LONGTEXT DEFAULT (NULL),
`createdby` VARCHAR(50) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `houselocations` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) DEFAULT (NULL),
`label` VARCHAR(255) DEFAULT (NULL),
`coords` TEXT DEFAULT (NULL),
`owned` TINYINT(1) DEFAULT (NULL),
`price` INT(11) DEFAULT (NULL),
`tier` TINYINT(4) DEFAULT (NULL),
`garage` TEXT DEFAULT (NULL),
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `player_houses` (
`id` INT(255) NOT NULL AUTO_INCREMENT,
`house` VARCHAR(50) NOT NULL,
`identifier` VARCHAR(50) DEFAULT (NULL),
`citizenid` VARCHAR(11) DEFAULT (NULL),
`keyholders` TEXT DEFAULT (NULL),
`decorations` TEXT DEFAULT (NULL),
`stash` TEXT DEFAULT (NULL),
`outfit` TEXT DEFAULT (NULL),
`logout` TEXT DEFAULT (NULL),
PRIMARY KEY (`id`),
KEY `house` (`house`),
KEY `citizenid` (`citizenid`),
KEY `identifier` (`identifier`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `house_plants` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`building` VARCHAR(50) DEFAULT (NULL),
`stage` INT(11) DEFAULT 1,
`sort` VARCHAR(50) DEFAULT (NULL),
`gender` VARCHAR(50) DEFAULT (NULL),
`food` INT(11) DEFAULT 100,
`health` INT(11) DEFAULT 100,
`progress` INT(11) DEFAULT 0,
`coords` TEXT DEFAULT (NULL),
`plantid` VARCHAR(50) DEFAULT (NULL),
PRIMARY KEY (`id`),
KEY `building` (`building`),
KEY `plantid` (`plantid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `lapraces` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) DEFAULT (NULL),
`checkpoints` TEXT DEFAULT (NULL),
`records` TEXT DEFAULT (NULL),
`creator` VARCHAR(50) DEFAULT (NULL),
`distance` INT(11) DEFAULT (NULL),
`raceid` VARCHAR(50) DEFAULT (NULL),
PRIMARY KEY (`id`),
KEY `raceid` (`raceid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `occasion_vehicles` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`seller` VARCHAR(50) DEFAULT (NULL),
`price` INT(11) DEFAULT (NULL),
`description` LONGTEXT DEFAULT (NULL),
`plate` VARCHAR(50) DEFAULT (NULL),
`model` VARCHAR(50) DEFAULT (NULL),
`mods` TEXT DEFAULT (NULL),
`occasionid` VARCHAR(50) DEFAULT (NULL),
PRIMARY KEY (`id`),
KEY `occasionId` (`occasionid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `phone_invoices` (
`id` INT(10) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`amount` INT(11) NOT NULL DEFAULT 0,
`society` TINYTEXT DEFAULT (NULL),
`sender` VARCHAR(50) DEFAULT (NULL),
`sendercitizenid` VARCHAR(50) DEFAULT (NULL),
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `phone_gallery` (
`citizenid` VARCHAR(11) NOT NULL ,
`image` VARCHAR(255) NOT NULL ,
`date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP()
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `player_mails` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`sender` VARCHAR(50) DEFAULT (NULL),
`subject` VARCHAR(50) DEFAULT (NULL),
`message` TEXT DEFAULT (NULL),
`read` TINYINT(4) DEFAULT 0,
`mailid` INT(11) DEFAULT (NULL),
`date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP(),
`button` TEXT DEFAULT (NULL),
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `phone_messages` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`number` VARCHAR(50) DEFAULT (NULL),
`messages` TEXT DEFAULT (NULL),
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`),
KEY `number` (`number`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `phone_tweets` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`firstName` VARCHAR(25) DEFAULT (NULL),
`lastName` VARCHAR(25) DEFAULT (NULL),
`message` TEXT DEFAULT (NULL),
`date` DATETIME DEFAULT CURRENT_TIMESTAMP(),
`url` TEXT DEFAULT (NULL),
`picture` VARCHAR(512) DEFAULT './img/default.png',
`tweetId` VARCHAR(25) NOT NULL,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `player_contacts` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`name` VARCHAR(50) DEFAULT (NULL),
`number` VARCHAR(50) DEFAULT (NULL),
`iban` VARCHAR(50) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `players` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) NOT NULL,
`cid` INT(11) DEFAULT (NULL),
`license` VARCHAR(255) NOT NULL,
`name` VARCHAR(255) NOT NULL,
`money` TEXT NOT NULL,
`charinfo` TEXT DEFAULT (NULL),
`job` TEXT NOT NULL,
`gang` TEXT DEFAULT (NULL),
`position` TEXT NOT NULL,
`metadata` TEXT NOT NULL,
`inventory` LONGTEXT DEFAULT (NULL),
`last_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP(),
PRIMARY KEY (`citizenid`),
KEY `id` (`id`),
KEY `last_updated` (`last_updated`),
KEY `license` (`license`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `playerskins` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) NOT NULL,
`model` VARCHAR(255) NOT NULL,
`skin` TEXT NOT NULL,
`active` TINYINT(4) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`),
KEY `active` (`active`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `player_outfits` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`citizenid` VARCHAR(11) DEFAULT (NULL),
`outfitname` VARCHAR(50) NOT NULL,
`model` VARCHAR(50) DEFAULT (NULL),
`skin` TEXT DEFAULT (NULL),
`outfitId` VARCHAR(50) NOT NULL,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`),
KEY `outfitId` (`outfitId`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `player_vehicles` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`license` VARCHAR(50) DEFAULT (NULL),
`citizenid` VARCHAR(11) DEFAULT (NULL),
`vehicle` VARCHAR(50) DEFAULT (NULL),
`hash` VARCHAR(50) DEFAULT (NULL),
`mods` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT (NULL),
`plate` VARCHAR(8) NOT NULL,
`fakeplate` VARCHAR(8) DEFAULT (NULL),
`garage` VARCHAR(50) DEFAULT (NULL),
`fuel` INT(11) DEFAULT 100,
`engine` FLOAT DEFAULT 1000,
`body` FLOAT DEFAULT 1000,
`state` INT(11) DEFAULT 1,
`depotprice` INT(11) NOT NULL DEFAULT 0,
`drivingdistance` INT(50) DEFAULT (NULL),
`status` TEXT DEFAULT (NULL),
`balance` INT(11) NOT NULL DEFAULT 0,
`paymentamount` INT(11) NOT NULL DEFAULT 0,
`paymentsleft` INT(11) NOT NULL DEFAULT 0,
`financetime` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `plate` (`plate`),
KEY `citizenid` (`citizenid`),
KEY `license` (`license`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `player_warns` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`senderIdentifier` VARCHAR(50) DEFAULT (NULL),
`targetIdentifier` VARCHAR(50) DEFAULT (NULL),
`reason` TEXT DEFAULT (NULL),
`warnId` VARCHAR(50) DEFAULT (NULL),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `inventories` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`identifier` VARCHAR(50) NOT NULL,
`items` LONGTEXT DEFAULT ('[]'),
PRIMARY KEY (`identifier`),
KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;