ich geh behindert

This commit is contained in:
2025-06-05 01:34:10 +02:00
parent 0ae23e5272
commit 375c48d72f
478 changed files with 11113 additions and 231267 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

File diff suppressed because one or more lines are too long

60
docs/v1-LEGACY/MYP.dbml Normal file
View File

@@ -0,0 +1,60 @@
Table "Printer" {
"id" int [unique, pk]
"name" text
"description" text
"status" int [note: '0: OPERATIONAL\n1: OUT_OF_ORDER']
"created_at" timestamp
"updated_at" timestamp
}
Table "PrintJob" {
"id" int [unique, pk]
"printer_id" int
"user_id" int
"start_at" timestamp
"duration_in_minutes" int
"comments" text
"aborted" bool [default: false]
"abort_reason" text [note: 'Error code displayed on printer']
"created_at" timestamp
"updated_at" timestamp
}
Table "Account" {
"id" text [unique, pk]
"userId" text
"type" text
"provider" text
"providerAccountId" text
"refresh_token" text
"access_token" text
"expires_at" int
"token_type" text
"scope" text
"id_token" text
"session_state" text
}
Table "Session" {
"id" text [unique, pk]
"sessionToken" text [unique]
"userId" text
"expires" datetime
}
Table "User" {
"id" text [pk]
"name" text
"email" text [unique]
"role" text [note: 'ADMIN,USER,GUEST']
}
Ref:"PrintJob"."user_id" < "User"."id"
Ref:"Account"."userId" < "User"."id"
Ref:"Session"."userId" < "User"."id"
Ref:"PrintJob"."printer_id" < "Printer"."id"

BIN
docs/v1-LEGACY/MYP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

57
docs/v1-LEGACY/MYP.sql Normal file
View File

@@ -0,0 +1,57 @@
CREATE TABLE `Printer` (
`id` int UNIQUE PRIMARY KEY,
`name` text,
`description` text,
`status` int COMMENT '0: OPERATIONAL
1: OUT_OF_ORDER',
`created_at` timestamp,
`updated_at` timestamp
);
CREATE TABLE `PrintJob` (
`id` int UNIQUE PRIMARY KEY,
`printer_id` int,
`user_id` int,
`start_at` timestamp,
`duration_in_minutes` int,
`comments` text,
`aborted` boolean DEFAULT false,
`abort_reason` text COMMENT 'Error code displayed on printer'
);
CREATE TABLE `Account` (
`id` text UNIQUE PRIMARY KEY,
`userId` text,
`type` text,
`provider` text,
`providerAccountId` text,
`refresh_token` text,
`access_token` text,
`expires_at` int,
`token_type` text,
`scope` text,
`id_token` text,
`session_state` text
);
CREATE TABLE `Session` (
`id` text UNIQUE PRIMARY KEY,
`sessionToken` text UNIQUE,
`userId` text,
`expires` datetime
);
CREATE TABLE `User` (
`id` text PRIMARY KEY,
`name` text,
`email` text UNIQUE,
`role` text COMMENT 'ADMIN,USER,GUEST'
);
ALTER TABLE `User` ADD FOREIGN KEY (`id`) REFERENCES `PrintJob` (`user_id`);
ALTER TABLE `User` ADD FOREIGN KEY (`id`) REFERENCES `Account` (`userId`);
ALTER TABLE `User` ADD FOREIGN KEY (`id`) REFERENCES `Session` (`userId`);
ALTER TABLE `Printer` ADD FOREIGN KEY (`id`) REFERENCES `PrintJob` (`printer_id`);