add schemas for DB (#11)
Co-authored-by: OxSaitama <arnaud.daubernatali@smart-chain.fr>
This commit is contained in:
parent
3acb49fd5b
commit
ed8ce2dab9
@ -35,7 +35,7 @@ model Contacts {
|
|||||||
last_name String @db.VarChar(255)
|
last_name String @db.VarChar(255)
|
||||||
email String @db.VarChar(255)
|
email String @db.VarChar(255)
|
||||||
phone_number String? @db.VarChar(50)
|
phone_number String? @db.VarChar(50)
|
||||||
cell_phone_number String @db.VarChar(50)
|
cell_phone_number String? @db.VarChar(50)
|
||||||
civility ECivility @default(MALE)
|
civility ECivility @default(MALE)
|
||||||
address Addresses @relation(fields: [address_uuid], references: [uuid])
|
address Addresses @relation(fields: [address_uuid], references: [uuid])
|
||||||
address_uuid String @unique @db.VarChar(255)
|
address_uuid String @unique @db.VarChar(255)
|
||||||
@ -48,16 +48,16 @@ model Contacts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model Users {
|
model Users {
|
||||||
uuid String @id @unique @default(uuid())
|
uuid String @id @unique @default(uuid())
|
||||||
idNot String @unique @db.VarChar(255)
|
idNot String @unique @db.VarChar(255)
|
||||||
contact Contacts @relation(fields: [contact_uuid], references: [uuid])
|
contact Contacts @relation(fields: [contact_uuid], references: [uuid])
|
||||||
contact_uuid String @unique @db.VarChar(255)
|
contact_uuid String @unique @db.VarChar(255)
|
||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
updated_at DateTime @updatedAt
|
updated_at DateTime @updatedAt
|
||||||
office_membership Office @relation(fields: [office_uuid], references: [uuid])
|
office_membership Office @relation(fields: [office_uuid], references: [uuid])
|
||||||
office_uuid String @db.VarChar(255)
|
office_uuid String @db.VarChar(255)
|
||||||
user_has_notifications UserHasNotifications[]
|
user_has_notifications UserHasNotifications[]
|
||||||
office_folder_has_stakeholder OfficeFolderHasStakeholder[]
|
office_folder_has_stakeholder OfficeFolderHasStakeholders[]
|
||||||
|
|
||||||
@@map("users")
|
@@map("users")
|
||||||
}
|
}
|
||||||
@ -117,20 +117,20 @@ model Notifications {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model OfficeFolders {
|
model OfficeFolders {
|
||||||
uuid String @id @unique @default(uuid())
|
uuid String @id @unique @default(uuid())
|
||||||
folder_number String @db.VarChar(255)
|
folder_number String @db.VarChar(255)
|
||||||
name String @db.VarChar(255)
|
name String @db.VarChar(255)
|
||||||
description String? @db.VarChar(255)
|
description String? @db.VarChar(255)
|
||||||
archived_description String? @db.VarChar(255)
|
archived_description String? @db.VarChar(255)
|
||||||
status EFolderStatus @default(LIVE)
|
status EFolderStatus @default(LIVE)
|
||||||
deed Deed @relation(fields: [deed_uuid], references: [uuid])
|
deed Deed @relation(fields: [deed_uuid], references: [uuid])
|
||||||
deed_uuid String @unique @db.VarChar(255)
|
deed_uuid String @unique @db.VarChar(255)
|
||||||
office Office @relation(fields: [office_uuid], references: [uuid])
|
office Office @relation(fields: [office_uuid], references: [uuid])
|
||||||
office_uuid String @db.VarChar(255)
|
office_uuid String @db.VarChar(255)
|
||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
updated_at DateTime @updatedAt
|
updated_at DateTime @updatedAt
|
||||||
office_folder_has_customers OfficeFolderHasCustomers[]
|
office_folder_has_customers OfficeFolderHasCustomers[]
|
||||||
office_folder_has_stakeholder OfficeFolderHasStakeholder[]
|
office_folder_has_stakeholder OfficeFolderHasStakeholders[]
|
||||||
documents Documents[]
|
documents Documents[]
|
||||||
|
|
||||||
@@map("office_folders")
|
@@map("office_folders")
|
||||||
@ -148,7 +148,7 @@ model OfficeFolderHasCustomers {
|
|||||||
@@map("office_folder_has_customers")
|
@@map("office_folder_has_customers")
|
||||||
}
|
}
|
||||||
|
|
||||||
model OfficeFolderHasStakeholder {
|
model OfficeFolderHasStakeholders {
|
||||||
uuid String @id @unique @default(uuid())
|
uuid String @id @unique @default(uuid())
|
||||||
office_folder OfficeFolders @relation(fields: [office_folder_uuid], references: [uuid])
|
office_folder OfficeFolders @relation(fields: [office_folder_uuid], references: [uuid])
|
||||||
office_folder_uuid String @db.VarChar(255)
|
office_folder_uuid String @db.VarChar(255)
|
||||||
@ -163,7 +163,7 @@ model OfficeFolderHasStakeholder {
|
|||||||
model Documents {
|
model Documents {
|
||||||
uuid String @id @unique @default(uuid())
|
uuid String @id @unique @default(uuid())
|
||||||
document_status EDocumentStatus @default(ASKED)
|
document_status EDocumentStatus @default(ASKED)
|
||||||
type DocumentTypes @relation(fields: [type_uuid], references: [uuid])
|
document_type DocumentTypes @relation(fields: [type_uuid], references: [uuid])
|
||||||
type_uuid String @db.VarChar(255)
|
type_uuid String @db.VarChar(255)
|
||||||
blockchain_anchor BlockchainAnchors? @relation(fields: [blockchain_anchor_uuid], references: [uuid])
|
blockchain_anchor BlockchainAnchors? @relation(fields: [blockchain_anchor_uuid], references: [uuid])
|
||||||
blockchain_anchor_uuid String? @db.VarChar(255)
|
blockchain_anchor_uuid String? @db.VarChar(255)
|
||||||
@ -180,13 +180,13 @@ model Documents {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model DocumentHistory {
|
model DocumentHistory {
|
||||||
uuid String @id @unique @default(uuid())
|
uuid String @id @unique @default(uuid())
|
||||||
document_history_type EDocumentStatus @default(ASKED)
|
document_status EDocumentStatus @default(ASKED)
|
||||||
refused_reason String? @db.VarChar(255)
|
refused_reason String? @db.VarChar(255)
|
||||||
document Documents @relation(fields: [document_uuid], references: [uuid])
|
document Documents @relation(fields: [document_uuid], references: [uuid])
|
||||||
document_uuid String @db.VarChar(255)
|
document_uuid String @db.VarChar(255)
|
||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
updated_at DateTime @updatedAt
|
updated_at DateTime @updatedAt
|
||||||
|
|
||||||
@@map("document_history")
|
@@map("document_history")
|
||||||
}
|
}
|
||||||
@ -216,11 +216,11 @@ model DocumentTypes {
|
|||||||
uuid String @id @unique @default(uuid())
|
uuid String @id @unique @default(uuid())
|
||||||
name String @db.VarChar(255)
|
name String @db.VarChar(255)
|
||||||
public_description String @db.VarChar(255)
|
public_description String @db.VarChar(255)
|
||||||
private_description String @db.VarChar(255)
|
private_description String? @db.VarChar(255)
|
||||||
archived_at DateTime?
|
archived_at DateTime?
|
||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
updated_at DateTime @updatedAt
|
updated_at DateTime @updatedAt
|
||||||
Documents Documents[]
|
documents Documents[]
|
||||||
deed_has_document_types DeedHasDocumentTypes[]
|
deed_has_document_types DeedHasDocumentTypes[]
|
||||||
deed_type_has_document_types DeedTypeHasDocumentTypes[]
|
deed_type_has_document_types DeedTypeHasDocumentTypes[]
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ model Deed {
|
|||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
updated_at DateTime @updatedAt
|
updated_at DateTime @updatedAt
|
||||||
deed_has_document_types DeedHasDocumentTypes[]
|
deed_has_document_types DeedHasDocumentTypes[]
|
||||||
office_folders OfficeFolders[]
|
office_folder OfficeFolders?
|
||||||
|
|
||||||
@@map("deed")
|
@@map("deed")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user