forked from GRGServer/SAMP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.sql
287 lines (260 loc) · 8.72 KB
/
database.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
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE TABLE `bankbranches` (
`propertyId` int(11) NOT NULL,
`bankId` int(11) NOT NULL,
PRIMARY KEY (`propertyId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `banks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `bans` (
`userId` int(11) NOT NULL,
`ip` varchar(16) NOT NULL,
`executorUserId` int(11) NOT NULL,
`time` datetime NOT NULL,
`reason` varchar(200) NOT NULL,
UNIQUE KEY `Client` (`userId`,`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `chatlog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`targetUserId` int(11) NOT NULL,
`channel` varchar(16) NOT NULL,
`time` datetime NOT NULL,
`text` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `cmdaliases` (
`userId` int(11) NOT NULL,
`name` varchar(32) NOT NULL,
`command` varchar(200) NOT NULL,
UNIQUE KEY `Index` (`userId`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `friends` (
`userId1` int(11) NOT NULL,
`userId2` int(11) NOT NULL,
`accepted` tinyint(1) NOT NULL,
KEY `Index` (`userId1`,`userId2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `hotelrooms` (
`propertyId` int(11) NOT NULL,
`roomId` int(11) NOT NULL,
`price` float NOT NULL,
`ownerUserId` int(11) NOT NULL,
UNIQUE KEY `Room` (`propertyId`,`roomId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `infopickups` (
`pickupId` int(11) NOT NULL,
`stringId` int(11) NOT NULL,
PRIMARY KEY (`pickupId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`ownerUserId` int(11) NOT NULL,
`employeeSalary` float NOT NULL,
`employerSalary` float NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `licenses` (
`giverUserId` int(11) NOT NULL,
`userId` int(11) NOT NULL,
`type` varchar(50) NOT NULL,
`date` datetime NOT NULL,
UNIQUE KEY `UniqueLicense` (`userId`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `missioncheckpointgroups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `missioncheckpoints` (
`missionId` int(11) NOT NULL,
`checkpointId` int(11) NOT NULL,
`posX` float NOT NULL,
`posY` float NOT NULL,
`posZ` float NOT NULL,
UNIQUE KEY `Checkpoint` (`missionId`,`checkpointId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `missions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`jobId` int(11) NOT NULL,
`creatorUserId` int(11) NOT NULL,
`acceptUserId` int(11) NOT NULL,
`creationTime` datetime NOT NULL,
`acceptTime` datetime NOT NULL,
`type` varchar(100) NOT NULL,
`data` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `navigationlocations` (
`type` int(11) NOT NULL,
`posX` float NOT NULL,
`posY` float NOT NULL,
`posZ` float NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `navigationlocationtypes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `news` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime NOT NULL,
`authorId` int(11) NOT NULL,
`title_en` varchar(200) NOT NULL,
`text_en` text NOT NULL,
`title_de` varchar(200) NOT NULL,
`text_de` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `permissions` (
`userId` int(11) NOT NULL,
`admin` tinyint(1) NOT NULL,
`mapper` tinyint(1) NOT NULL,
`moderator` tinyint(1) NOT NULL,
`navi` tinyint(1) NOT NULL,
`npcAdmin` tinyint(1) NOT NULL,
`serverAdmin` tinyint(1) NOT NULL,
`spawnVehicle` tinyint(1) NOT NULL,
`teleport` tinyint(1) NOT NULL,
PRIMARY KEY (`userId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `pickups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`posX` float NOT NULL,
`posY` float NOT NULL,
`posZ` float NOT NULL,
`type` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Position` (`posX`,`posY`,`posZ`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `properties` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pickupId` int(11) NOT NULL,
`interiorId` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`price` float NOT NULL,
`cameraPosX` float NOT NULL,
`cameraPosY` float NOT NULL,
`cameraPosZ` float NOT NULL,
`ownerUserId` int(11) NOT NULL,
`locked` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `PickupID` (`pickupId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `teleports` (
`name` varchar(100) NOT NULL,
`posX` float NOT NULL,
`posY` float NOT NULL,
`posZ` float NOT NULL,
`angle` float NOT NULL,
`interior` int(11) NOT NULL,
PRIMARY KEY (`name`),
UNIQUE KEY `Position` (`posX`,`posY`,`posZ`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `tplinks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pickupId` int(11) DEFAULT NULL,
`posX` float DEFAULT NULL,
`posY` float DEFAULT NULL,
`posZ` float DEFAULT NULL,
`angle` float DEFAULT NULL,
`interior` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL,
`password` varchar(32) NOT NULL,
`sessionId` varchar(32) NOT NULL DEFAULT '',
`language` varchar(2) NOT NULL DEFAULT 'en',
`gender` varchar(1) NOT NULL,
`birthDate` date NOT NULL,
`location` varchar(100) NOT NULL DEFAULT '',
`mobilePhoneNumber` int(11) NOT NULL DEFAULT '0',
`money` float(16,2) NOT NULL DEFAULT '0.00',
`bankId` int(11) NOT NULL DEFAULT '0',
`bankMoney` float(16,2) NOT NULL DEFAULT '0.00',
`bankPin` int(11) NOT NULL DEFAULT '0',
`bankPinAttempts` int(11) NOT NULL DEFAULT '0',
`health` float NOT NULL DEFAULT '100',
`skin` int(11) NOT NULL,
`godMode` tinyint(1) NOT NULL DEFAULT '0',
`chatMode` varchar(16) NOT NULL DEFAULT 'RANGE',
`chatModeUserId` int(11) NOT NULL,
`currentPropertyId` int(11) NOT NULL DEFAULT '0',
`posX` float NOT NULL,
`posY` float NOT NULL,
`posZ` float NOT NULL,
`angle` float NOT NULL,
`interior` int(11) NOT NULL DEFAULT '0',
`jobId` int(11) NOT NULL DEFAULT '0',
`registerTime` datetime NOT NULL,
`loginTime` datetime NOT NULL,
`onlineTime` int(11) NOT NULL DEFAULT '0',
`clientVersion` varchar(50) NOT NULL DEFAULT '',
`lastPayDay` int(11) NOT NULL DEFAULT '0',
`lastNewsId` int(11) NOT NULL DEFAULT '0',
`showClock` tinyint(1) NOT NULL DEFAULT '1',
`inTutorial` tinyint(1) NOT NULL DEFAULT '1',
`deaths` int(11) NOT NULL DEFAULT '0',
`wantedLevel` int(11) NOT NULL DEFAULT '0',
`speedLimitPoints` int(11) NOT NULL DEFAULT '0',
`bladder` float NOT NULL DEFAULT '100',
`energy` float NOT NULL DEFAULT '100',
`hunger` float NOT NULL DEFAULT '100',
`thirst` float NOT NULL DEFAULT '100',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `vehiclecomponents` (
`vehicleId` int(11) NOT NULL,
`slot` int(11) NOT NULL,
`component` int(11) NOT NULL,
UNIQUE KEY `UNIQUE` (`vehicleId`,`slot`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `vehicles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`numberplate` varchar(8) NOT NULL,
`posX` float NOT NULL,
`posY` float NOT NULL,
`posZ` float NOT NULL,
`angle` float NOT NULL,
`interior` int(11) NOT NULL,
`mileAge` float NOT NULL,
`health` float NOT NULL,
`modelId` int(11) NOT NULL,
`color1` int(11) NOT NULL,
`color2` int(11) NOT NULL,
`paintjobId` int(11) NOT NULL,
`price` float NOT NULL,
`currentFuel` float NOT NULL,
`lastRadioStation` int(11) NOT NULL,
`jobId` int(11) NOT NULL,
`frontLightId` int(11) NOT NULL,
`neonLightId` int(11) NOT NULL,
`hasNavi` tinyint(1) NOT NULL,
`locked` tinyint(1) NOT NULL,
`allowDriveUserId` int(11) NOT NULL,
`ownerSellerId` int(11) NOT NULL,
`ownerUserId` int(11) NOT NULL,
`radioStationId` int(11) NOT NULL,
`sellerUserId` int(11) NOT NULL,
`tax` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `NumberPlate` (`numberplate`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;