-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.sql
93 lines (74 loc) · 2.26 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
DROP TABLE IF EXISTS `ads`;
CREATE TABLE `ads` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`uid` int(255) NOT NULL,
`title` varchar(255) NOT NULL,
`cat` int(255) DEFAULT NULL,
`pay` double NOT NULL,
`time` int(255) NOT NULL,
`location` text NOT NULL,
`description` text NOT NULL,
`closed` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `categories`;
CREATE TABLE `categories` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`cat_name` varchar(255) NOT NULL,
`description` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `chat`;
CREATE TABLE `chat` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`dst` int(255) NOT NULL,
`src` text NOT NULL,
`msg` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `notif`;
CREATE TABLE `notif` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`uid` int(255) NOT NULL,
`icon` enum('HIRED','APPLIED') DEFAULT NULL,
`text` text NOT NULL,
`link` text NOT NULL,
`seen` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `ratings`;
CREATE TABLE `ratings` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`rated` int(255) NOT NULL,
`rater` int(255) NOT NULL,
`job` int(255) NOT NULL,
`stars` int(255) NOT NULL,
`comment` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `responses`;
CREATE TABLE `responses` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`adid` int(255) NOT NULL,
`uid` int(255) NOT NULL,
`comment` text,
`matched` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`type` enum('EMPLOYEE','EMPLOYER','ADMIN') NOT NULL DEFAULT 'EMPLOYEE',
`name` text NOT NULL,
`email` text NOT NULL,
`password` text NOT NULL,
`zipcode` varchar(10) NOT NULL,
`phone` varchar(25) NOT NULL,
`picture` varchar(255) DEFAULT NULL,
`address` text,
`bio` text,
`notify` tinyint(1) NOT NULL DEFAULT '1',
`active` tinyint(1) NOT NULL DEFAULT '0',
`session` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;