This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
/
qb-phone.sql
125 lines (113 loc) · 4.2 KB
/
qb-phone.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
DROP TABLE IF EXISTS `phone_gallery`;
CREATE TABLE IF NOT EXISTS `phone_gallery` (
`citizenid` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
`date` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `phone_invoices`;
CREATE TABLE IF NOT EXISTS `phone_invoices` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`amount` int(11) NOT NULL DEFAULT 0,
`society` tinytext DEFAULT NULL,
`sender` varchar(50) DEFAULT NULL,
`sendercitizenid` varchar(50) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `phone_messages`;
CREATE TABLE IF NOT EXISTS `phone_messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`number` varchar(50) DEFAULT NULL,
`messages` text DEFAULT NULL,
`time` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`),
KEY `number` (`number`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `phone_note`;
CREATE TABLE IF NOT EXISTS `phone_note` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`title` text DEFAULT NULL,
`text` text DEFAULT NULL,
`lastupdate` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `phone_tweets`;
CREATE TABLE IF NOT EXISTS `phone_tweets` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`firstName` varchar(25) DEFAULT NULL,
`lastName` varchar(25) DEFAULT NULL,
`type` varchar(25) DEFAULT NULL,
`message` text DEFAULT NULL,
`url` text DEFAULT NULL,
`tweetId` varchar(25) NOT NULL,
`date` datetime DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=289 DEFAULT CHARSET=UTF8;
DROP TABLE IF EXISTS `player_contacts`;
CREATE TABLE IF NOT EXISTS `player_contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`number` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `player_mails`;
CREATE TABLE IF NOT EXISTS `player_mails` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) 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=49 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `phone_chatrooms`;
CREATE TABLE `phone_chatrooms` (
`id` INT unsigned NOT NULL AUTO_INCREMENT,
`room_code` VARCHAR(10) NOT NULL UNIQUE,
`room_name` VARCHAR(15) NOT NULL,
`room_owner_id` VARCHAR(20),
`room_owner_name` VARCHAR(60),
`room_members` TEXT DEFAULT '{}',
`room_pin` VARCHAR(50),
`unpaid_balance` DECIMAL(10,2) DEFAULT 0,
`is_pinned` BOOLEAN DEFAULT 0,
`created` DATETIME DEFAULT NOW(),
PRIMARY KEY (`id`)
);
INSERT INTO `phone_chatrooms` (`room_code`, `room_name`, `room_owner_id`, `room_owner_name`, `is_pinned`) VALUES
('411', '411', 'official', 'Government', 1),
('lounge', 'The Lounge', 'official', 'Government', 1),
('events', 'Events', 'official', 'Government', 1);
DROP TABLE IF EXISTS `phone_chatroom_messages`;
CREATE TABLE `phone_chatroom_messages` (
`id` INT unsigned NOT NULL AUTO_INCREMENT,
`room_id` INT unsigned,
`member_id` VARCHAR(20),
`member_name` VARCHAR(50),
`message` TEXT NOT NULL,
`is_pinned` BOOLEAN DEFAULT FALSE,
`created` DATETIME DEFAULT NOW(),
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `player_jobs`;
CREATE TABLE IF NOT EXISTS `player_jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`jobname` varchar(50) DEFAULT NULL,
`employees` text DEFAULT NULL,
`maxEmployee` tinyint(11) DEFAULT 15,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=utf8;