From e92d854a1cb74904bf21cf0b84f2750a84ea682d Mon Sep 17 00:00:00 2001
From: Carson Fleming <cflems@cflems.net>
Date: Mon, 12 Dec 2022 02:24:36 -0800
Subject: Added database structure dump

---
 database.sql | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)
 create mode 100644 database.sql

(limited to 'database.sql')

diff --git a/database.sql b/database.sql
new file mode 100644
index 0000000..3bb2173
--- /dev/null
+++ b/database.sql
@@ -0,0 +1,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;
-- 
cgit v1.2.3

