Created Axum routing for localhost, also SQL Table structure
Added a axum router and listener for serving a web page on localhost. Also a sql table structure was created with sqlx migrate for storing tickets and users
This commit is contained in:
10
migrations/20260422094706_ticket_table.sql
Normal file
10
migrations/20260422094706_ticket_table.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
CREATE TYPE category AS ENUM('Whiteboard Beamer', 'Internet', 'iPad Koffer', 'Apple TV', 'Docu Cam', 'Sonstiges')
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tickets (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
category category NOT NULL DEFAULT 'Sonstiges',
|
||||
betreff VARCHAR(100),
|
||||
description VARCHAR,
|
||||
room SMALLINT,
|
||||
user_id SMALLINT
|
||||
);
|
||||
6
migrations/20260422094717_user_table.sql
Normal file
6
migrations/20260422094717_user_table.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE users (
|
||||
id SMALLINT PRIMARY KEY AUTOINCREMENT,
|
||||
name VARCHAR(30),
|
||||
firstname VARCHAR(30),
|
||||
is_admin BOOLEAN NOT NULL DEFAULT false
|
||||
);
|
||||
Reference in New Issue
Block a user