Create MYP.dbml
This commit is contained in:
parent
0cfa856705
commit
f620059895
60
docs/MYP.dbml
Normal file
60
docs/MYP.dbml
Normal 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"
|
Loading…
x
Reference in New Issue
Block a user