More webgui development

This commit is contained in:
2024-04-30 19:38:28 +02:00
parent c3b5ef95a9
commit 0c09ce2916
21 changed files with 1056 additions and 155 deletions
+22 -6
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: WTFPL */
/* MariaDB Scheme
/* MariaDB Scheme
Version: 1 */
CREATE TABLE user (
@@ -19,7 +19,7 @@ CREATE TABLE user (
E.g. the currently selected boat. Users logged in via the web are allowed
to write to this table. Therefore a separate table and not additional
fields in the user data record.
userid=0: Global program settings
sno=0: db_scheme_version
sno=1: doc_base_path
@@ -95,6 +95,7 @@ CREATE TABLE tag (
tagid smallint(6) NOT NULL AUTO_INCREMENT,
tagname varchar(20) NOT NULL,
color char(6) DEFAULT NULL,
description varchar(80) DEFAULT NULL,
PRIMARY KEY (tagid),
UNIQUE INDEX ix_tagname (tagname)
);
@@ -102,7 +103,7 @@ CREATE TABLE tag (
CREATE TABLE tagref (
tagid smallint(6) NOT NULL,
objid smallint(6) NOT NULL,
objtype enum('equip','inv','prov','doc') NOT NULL,
objtype enum('equip','inv','prov','doc', 'proj', 'task', 'maint') NOT NULL,
PRIMARY KEY (tagid, objid, objtype)
);
@@ -111,6 +112,7 @@ CREATE TABLE tagref (
CREATE TABLE box (
boxid smallint(6) NOT NULL AUTO_INCREMENT,
sid smallint(6) NOT NULL,
boxtype tinyint(3) DEFAULT NULL,
parent int(10) DEFAULT NULL,
label varchar(20) DEFAULT NULL,
color char(6) DEFAULT NULL,
@@ -141,7 +143,7 @@ CREATE TABLE equipment (
CREATE TABLE inventory (
invid int(10) NOT NULL AUTO_INCREMENT,
invname varchar(80) NOT NULL,
boxtype enum('storage','box') NOT NULL DEFAULT 'storage',
conttype enum('storage','box') NOT NULL DEFAULT 'storage',
sid smallint(6) NOT NULL DEFAULT 1,
boxid smallint(6) NOT NULL DEFAULT 1,
number smallint(6) UNSIGNED NOT NULL DEFAULT 1,
@@ -198,7 +200,7 @@ CREATE TABLE document (
CREATE TABLE docref (
drid int(10) NOT NULL AUTO_INCREMENT,
reftype enum('vessel', 'box', 'equipment', 'project', 'task', 'user') NOT NULL DEFAULT 'vessel',
reftype enum('vessel', 'box', 'equipment', 'project', 'task', 'user', 'company') NOT NULL DEFAULT 'vessel',
docid smallint(6) NOT NULL,
refid smallint(6) NOT NULL,
PRIMARY KEY (drid),
@@ -260,12 +262,26 @@ CREATE TABLE project (
CREATE TABLE task (
taskid int(10) NOT NULL AUTO_INCREMENT,
vid smallint(6) DEFAULT NULL,
projid smallint(6) DEFAULT NULL,
taskname varchar(60) NOT NULL,
taskstate enum('new','finished') NOT NULL DEFAULT 'new',
priority enum('high','medium','low') DEFAULT NULL,
taskstate enum('pending','waiting','deleted','completed') NOT NULL DEFAULT 'pending',
plandate date DEFAULT NULL,
duedate date DEFAULT NULL,
started datetime DEFAULT NULL,
finished datetime DEFAULT NULL,
PRIMARY KEY (taskid)
);
CREATE TABLE note (
noteid int(10) NOT NULL AUTO_INCREMENT,
notetype enum('task','maint') NOT NULL DEFAULT 'task',
refid smallint(6) NOT NULL,
annotation text NOT NULL,
PRIMARY KEY (noteid)
);
CREATE TABLE checklist (
clid smallint(6) NOT NULL AUTO_INCREMENT,
title varchar(30) NOT NULL,