feat(constructeurs): introduce constructors management
This commit is contained in:
@@ -81,7 +81,6 @@ model Machine {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
reference String?
|
||||
constructeur String?
|
||||
prix Decimal? @db.Decimal(10, 2)
|
||||
emplacement String?
|
||||
createdAt DateTime @default(now())
|
||||
@@ -94,6 +93,9 @@ model Machine {
|
||||
typeMachineId String?
|
||||
typeMachine TypeMachine? @relation(fields: [typeMachineId], references: [id])
|
||||
|
||||
constructeurId String?
|
||||
constructeur Constructeur? @relation(fields: [constructeurId], references: [id], onDelete: SetNull)
|
||||
|
||||
composants Composant[]
|
||||
pieces Piece[]
|
||||
documents Document[] @relation("MachineDocuments")
|
||||
@@ -106,7 +108,6 @@ model Composant {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
reference String?
|
||||
constructeur String?
|
||||
prix Decimal? @db.Decimal(10, 2)
|
||||
emplacement String?
|
||||
createdAt DateTime @default(now())
|
||||
@@ -123,6 +124,9 @@ model Composant {
|
||||
typeComposantId String?
|
||||
typeComposant TypeComposant? @relation(fields: [typeComposantId], references: [id])
|
||||
|
||||
constructeurId String?
|
||||
constructeur Constructeur? @relation(fields: [constructeurId], references: [id], onDelete: SetNull)
|
||||
|
||||
pieces Piece[]
|
||||
documents Document[] @relation("ComposantDocuments")
|
||||
customFieldValues CustomFieldValue[] @relation("ComposantCustomFieldValues")
|
||||
@@ -134,7 +138,6 @@ model Piece {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
reference String?
|
||||
constructeur String?
|
||||
prix Decimal? @db.Decimal(10, 2)
|
||||
emplacement String?
|
||||
createdAt DateTime @default(now())
|
||||
@@ -150,12 +153,30 @@ model Piece {
|
||||
typePieceId String?
|
||||
typePiece TypePiece? @relation(fields: [typePieceId], references: [id])
|
||||
|
||||
constructeurId String?
|
||||
constructeur Constructeur? @relation(fields: [constructeurId], references: [id], onDelete: SetNull)
|
||||
|
||||
documents Document[] @relation("PieceDocuments")
|
||||
customFieldValues CustomFieldValue[] @relation("PieceCustomFieldValues")
|
||||
|
||||
@@map("pieces")
|
||||
}
|
||||
|
||||
model Constructeur {
|
||||
id String @id @default(cuid())
|
||||
name String @unique
|
||||
email String?
|
||||
phone String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
machines Machine[]
|
||||
composants Composant[]
|
||||
pieces Piece[]
|
||||
|
||||
@@map("constructeurs")
|
||||
}
|
||||
|
||||
model Document {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
|
||||
Reference in New Issue
Block a user