-
Notifications
You must be signed in to change notification settings - Fork 0
/
newStuff.sql
143 lines (131 loc) · 4.98 KB
/
newStuff.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
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE DATABASE IF NOT EXISTS `DT_DB` DEFAULT CHARACTER SET utf8mb4;
USE `DT_DB`;
CREATE TABLE IF NOT EXISTS `players` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`pid` varchar(17) NOT NULL,
`cash` int NOT NULL DEFAULT 0,
`bank` int NOT NULL DEFAULT 30000,
`dojLevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
`copLevel` enum('0','1','2','3','4','5','6','7') NOT NULL DEFAULT '0',
`medLevel` enum('0','1','2','3','4','5','6','7') NOT NULL DEFAULT '0',
`copDepartment` enum('0','1','2','3','4') NOT NULL DEFAULT '0',
`medDepartment` enum('0','1','2') NOT NULL DEFAULT '0',
`licenses` text NOT NULL DEFAULT '[]',
`civGear` text NOT NULL DEFAULT '[]',
`copGear` text NOT NULL DEFAULT '[]',
`medGear` text NOT NULL DEFAULT '[]',
`stats` varchar(64) NOT NULL DEFAULT '[100,100,100,5000,[0,0,0,0,0,0]]', /*[hunger,thirst,battery,blood,[head,torso,arm_l,arm_r,leg_l,leg_r]]*/
`jailStats` text NOT NULL DEFAULT '[false,"",0,""]',
`position` varchar(64) NOT NULL DEFAULT '[]',
`phoneNumber` varchar(12) NOT NULL,
`skills` varchar(100) NOT NULL DEFAULT '[0,0,0,0,0]',
PRIMARY KEY (`id`),
UNIQUE KEY `pid` (`pid`),
UNIQUE KEY `phoneNumber` (`phoneNumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `vehicles` (
`plate` varchar(7) NOT NULL,
`faction` varchar(6) NOT NULL,
`classname` varchar(64) NOT NULL,
`type` varchar(10) NOT NULL,
`pid` varchar(17) NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT 1,
`customisation` varchar(256) NOT NULL DEFAULT '[]', /*[colour,rvmat,plate,tint,wheel colour,spoiler]*/
`fuel` double NOT NULL DEFAULT 1,
`damage` varchar(256) NOT NULL DEFAULT '[]',
`impounded` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`plate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `houses` (
`id` int NOT NULL AUTO_INCREMENT,
`pid` varchar(17) NOT NULL,
`pos` varchar(64) DEFAULT NULL,
`type` tinyint(1) NOT NULL DEFAULT 0,
`furniture` text NOT NULL DEFAULT '[]', /*[[id,class,pos,gear,dir],[]]*/
`shared` varchar(400) NOT NULL DEFAULT '[]',
`alarm` varchar(17) NOT NULL DEFAULT '[false,false]',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `shops` (
`id` int NOT NULL AUTO_INCREMENT,
`pid` varchar(17) DEFAULT NULL,
`name` varchar(64) NOT NULL,
`pos` varchar(64) DEFAULT NULL,
`items` text NOT NULL DEFAULT '[]', /*[[item,price,quantity]]*/
`funds` int NOT NULL DEFAULT 0,
`transaction_log` text NOT NULL DEFAULT '[]',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `companies` (
`pid` varchar(17) NOT NULL,
`name` varchar(48) NOT NULL,
`description` varchar(256) NOT NULL DEFAULT '',
`tasks` varchar(256) NOT NULL DEFAULT '',
`bank` int NOT NULL DEFAULT 0,
`employees` text,
PRIMARY KEY (`name`),
UNIQUE KEY `pid` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `pd_db_arrests` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`crimes` text NOT NULL,
`officer` varchar(64) NOT NULL,
`time` int NOT NULL,
`bail` int NOT NULL,
`notes` varchar(256) NOT NULL DEFAULT '',
`insertTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `pd_db_tickets` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`crimes` text NOT NULL,
`officer` varchar(64) NOT NULL,
`cost` int(7) NOT NULL,
`insertTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `pd_db_warrants` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`crimes` text NOT NULL,
`officer` varchar(64) NOT NULL,
`notes` text NOT NULL,
`type` tinyint(1) DEFAULT 0,
`approved` varchar(64) DEFAULT '',
`active` tinyint(1) DEFAULT 1,
`completedBy` varchar(64) DEFAULT '',
`insertTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `logs` (
`id` int NOT NULL AUTO_INCREMENT,
`pid` varchar(17) NOT NULL,
`name` varchar(32) NOT NULL,
`action` varchar(255) DEFAULT NULL,
`insertTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `routine_logs` (
`id` int NOT NULL AUTO_INCREMENT,
`pid` varchar(17) NOT NULL,
`name` varchar(32) NOT NULL,
`action` varchar(255) DEFAULT NULL,
`insertTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `persis_vars` (
`serverID` int NOT NULL AUTO_INCREMENT,
`threat` varchar(10) NOT NULL DEFAULT 'Green',
`mayor` varchar(32) NOT NULL DEFAULT '',
`tax` varchar(30) NOT NULL DEFAULT '[0,0,0]',
`bank` int NOT NULL DEFAULT 0,
`announcement` varchar (140) NOT NULL DEFAULT '',
PRIMARY KEY (`serverID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;