Inital work on AFLOW-37
This commit is contained in:
parent
f52897fd4d
commit
cd37f096ca
@ -38,7 +38,7 @@ model Item {
|
||||
SKU String? @unique
|
||||
amount Int @default(1)
|
||||
name String
|
||||
comment String? @db.VarChar(2048)
|
||||
comment String? @db.VarChar(2048)
|
||||
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)?
|
||||
|
||||
contactInfo contactInfo? @relation(fields: [contactInfoId], references: [id])
|
||||
@ -55,8 +55,8 @@ model Item {
|
||||
storageLocation StorageLocation? @relation(fields: [storageLocationId], references: [id])
|
||||
storageLocationId Int?
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
createdBy String?
|
||||
}
|
||||
|
||||
@ -99,6 +99,21 @@ model contactInfo {
|
||||
|
||||
StorageUnit StorageUnit[]
|
||||
Item Item[]
|
||||
project project[]
|
||||
projectAssignedUsers project[] @relation("projectAssignedUsers")
|
||||
}
|
||||
|
||||
model project {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @unique
|
||||
description String? @db.VarChar(2048)
|
||||
// People
|
||||
manager contactInfo? @relation(fields: [contactInfoId], references: [id]) // Primary, manager of the project
|
||||
assignedUsers contactInfo[] @relation("projectAssignedUsers") // Secondary, assigned users to the project, stagehands, etc.
|
||||
contactInfoId Int?
|
||||
// When does it start and end
|
||||
startTime DateTime?
|
||||
endTime DateTime?
|
||||
}
|
||||
|
||||
/// TODO: Allow multiple types to be used?
|
||||
|
Loading…
Reference in New Issue
Block a user