From 886ccc0dcbeb43e6685da9acbf3f899503baadc1 Mon Sep 17 00:00:00 2001 From: Gonne Date: Mon, 12 Sep 2022 19:46:30 +0200 Subject: [PATCH] =?UTF-8?q?Behebe=20Kompilierfehler=20und=20f=C3=BCge=20My?= =?UTF-8?q?SQL=20Datenbankschema=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repositories/request.go | 1 - sprechstundenMysql.sql | 62 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 sprechstundenMysql.sql diff --git a/repositories/request.go b/repositories/request.go index ea51e8c..0dca65f 100644 --- a/repositories/request.go +++ b/repositories/request.go @@ -6,7 +6,6 @@ import ( "crypto/rand" "database/sql" "html/template" - "log" "math/big" "net/smtp" "sprechstundentool/models" diff --git a/sprechstundenMysql.sql b/sprechstundenMysql.sql new file mode 100644 index 0000000..8c4632d --- /dev/null +++ b/sprechstundenMysql.sql @@ -0,0 +1,62 @@ +-- +-- Table structure for table `room` +-- + +DROP TABLE IF EXISTS `room`; +CREATE TABLE `room` ( + `id` INTEGER PRIMARY KEY AUTO_INCREMENT, + `name` text NOT NULL, + `max_occupy` int DEFAULT NULL +); + +-- +-- Table structure for table `request` +-- + +DROP TABLE IF EXISTS `request`; +CREATE TABLE `request` ( + `id` INTEGER PRIMARY KEY AUTO_INCREMENT, + `officeHour` int DEFAULT NULL, + `action` int DEFAULT NULL, + `secret` text DEFAULT NULL +); + +-- +-- Table structure for table `officeHour` +-- + +DROP TABLE IF EXISTS `officeHour`; +CREATE TABLE `officeHour` ( + `id` INTEGER PRIMARY KEY AUTO_INCREMENT, + `tutor` int DEFAULT NULL, + `day` int DEFAULT NULL, + `hour` int DEFAULT NULL, + `minute` int DEFAULT NULL, + `room` int DEFAULT NULL, + `course` int DEFAULT NULL, + `week` int DEFAULT NULL, + `info` text DEFAULT NULL, + `active` bool DEFAULT NULL, + `duration` int DEFAULT NULL +); + +-- +-- Table structure for table `tutor` +-- + +DROP TABLE IF EXISTS `tutor`; +CREATE TABLE `tutor` ( + `id` INTEGER PRIMARY KEY AUTO_INCREMENT, + `name` tinytext DEFAULT NULL, + `email` tinytext DEFAULT NULL +); + +-- +-- Table structure for table `course` +-- + +DROP TABLE IF EXISTS `course`; +CREATE TABLE `course` ( + `id` INTEGER PRIMARY KEY AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL +);