CREDENTIAL TYPE MANAGEMENT WORKS
This commit is contained in:
@@ -62,6 +62,54 @@ model Company {
|
||||
cw_CompanyId Int @unique
|
||||
cw_Identifier String @unique
|
||||
|
||||
credentials Credential[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model CredentialType {
|
||||
id String @id @default(cuid())
|
||||
name String @unique
|
||||
|
||||
permissionScope String
|
||||
icon String?
|
||||
fields Json
|
||||
|
||||
credentials Credential[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model SecureValue {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
|
||||
content String // Encrypted content
|
||||
hash String // Hash of the original content for integrity verification and Search
|
||||
|
||||
credentialId String
|
||||
credential Credential @relation(fields: [credentialId], references: [id], onDelete: Cascade)
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model Credential {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
|
||||
typeId String
|
||||
type CredentialType @relation(fields: [typeId], references: [id], onDelete: Cascade)
|
||||
|
||||
fields Json
|
||||
|
||||
companyId String
|
||||
company Company @relation(fields: [companyId], references: [id], onDelete: Cascade)
|
||||
|
||||
securevalues SecureValue[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user