diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 917e1ba..86e0172 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -25,7 +25,7 @@ generator dbml {
projectName = "AssetFlow"
}
-enum Status {
+enum itemStatus {
normal
borrowed
stolen
@@ -33,16 +33,16 @@ enum Status {
}
model Item {
- id Int @id @unique @default(autoincrement())
- SKU String? @unique
- amount Int @default(1)
+ id Int @id @unique @default(autoincrement())
+ SKU String? @unique
+ amount Int @default(1)
name String
- Comment String?
- status Status @default(normal) /// TODO: Would it be better to create a separate model for this as well instead of providing several static statuses to choose from(enum)?
+ comment String?
+ status itemStatus @default(normal) /// TODO: Would it be better to create a separate model for this as well instead of providing several static statuses to choose from(enum)?
- manufacturer String /// TODO: Do we need this as a mandatory field? Probably we can add another model for manufacturer.
+ manufacturer String
- category Category @relation(fields: [categoryId], references: [id])
+ category itemCategory @relation(fields: [categoryId], references: [id])
categoryId Int
items Item[] @relation("items") /// Item beinhaltet..
@@ -66,17 +66,16 @@ model StorageLocation {
/// A StorageUnit is the base and can hold multiple StorageLocations.
model StorageUnit {
- id Int @id @default(autoincrement())
- name String
- street String
- houseNumber String
- zipCode String
- city String
- country String
+ id Int @id @default(autoincrement())
+ name String
+
+ contactInfo contactInfo? @relation(fields: [contactInfoId], references: [id])
+ contactInfoId Int?
+
StorageLocation StorageLocation[]
}
-model Category {
+model itemCategory {
id Int @id @default(autoincrement())
name String @unique
description String?
@@ -84,20 +83,24 @@ model Category {
}
/// TODO: Add relationship to StorageUnit, Item and if necessary to StorageLocation.
-model Owner {
- id Int @id @default(autoincrement())
- type OwnerType @default(person)
- name String
+model contactInfo {
+ id Int @id @default(autoincrement())
+ type contactType @default(person)
+ name String?
lastName String?
street String
houseNumber String
zipCode String
city String
country String
+
+ StorageUnit StorageUnit[]
}
-enum OwnerType {
+enum contactType {
person
customer
company
+ partner
+ enemy
}
diff --git a/src/frontend/manage/imports/csvImport.eta.html b/src/frontend/manage/imports/csvImport.eta.html
index 14ccdde..6cb710b 100644
--- a/src/frontend/manage/imports/csvImport.eta.html
+++ b/src/frontend/manage/imports/csvImport.eta.html
@@ -1,5 +1,5 @@
<%~ E.includeFile("../../partials/head.eta.html", {"title": "Importer - CSV" }) %>
- <%~ E.includeFile("../../partials/controls.eta.html", {"active": "SETT_CSV_IMPORT" }) %>
+ <%~ E.includeFile("../../partials/controls.eta.html", {"active": "SETT_IMPORT_CSV" }) %>
Import A CSV File
Upload a CSV file to import into the database. The CSV file must have the following columns:
diff --git a/src/frontend/manage/startpage.eta.html b/src/frontend/manage/startpage.eta.html
new file mode 100644
index 0000000..092a7df
--- /dev/null
+++ b/src/frontend/manage/startpage.eta.html
@@ -0,0 +1,27 @@
+<%~ E.includeFile("../partials/head.eta.html", {"title": "Settings"}) %> <%~ E.includeFile("../partials/controls.eta.html", {"active": "SETT"}) %>
+
+