Behebe Kompilierfehler und füge MySQL Datenbankschema hinzu

This commit is contained in:
Gonne 2022-09-12 19:46:30 +02:00
parent e89429c3c3
commit 886ccc0dcb
2 changed files with 62 additions and 1 deletions

View File

@ -6,7 +6,6 @@ import (
"crypto/rand"
"database/sql"
"html/template"
"log"
"math/big"
"net/smtp"
"sprechstundentool/models"

62
sprechstundenMysql.sql Normal file
View File

@ -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
);