Creating import&export excel
This commit is contained in:
@@ -150,6 +150,7 @@ model Organization {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
users User[]
|
||||
orgRoles OrgRole[]
|
||||
companies Company[]
|
||||
people Person[]
|
||||
pipelines Pipeline[]
|
||||
@@ -199,6 +200,10 @@ model User {
|
||||
role UserRole @default(sales)
|
||||
/// مسیر فایل آواتار در فضای آپلود
|
||||
avatarStorageKey String?
|
||||
isActive Boolean @default(true)
|
||||
lastLoginAt DateTime?
|
||||
orgRoleId String?
|
||||
orgRole OrgRole? @relation(fields: [orgRoleId], references: [id], onDelete: SetNull)
|
||||
emailVerifiedAt DateTime?
|
||||
mobileVerifiedAt DateTime?
|
||||
organizationId String
|
||||
@@ -229,6 +234,25 @@ model User {
|
||||
@@unique([mobile])
|
||||
@@index([organizationId])
|
||||
@@index([email])
|
||||
@@index([orgRoleId])
|
||||
}
|
||||
|
||||
model OrgRole {
|
||||
id String @id @default(cuid())
|
||||
organizationId String
|
||||
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
||||
name String
|
||||
description String @default("")
|
||||
color String @default("teal")
|
||||
permissions String[] @default([])
|
||||
/// owner | admin | sales | support — نقشهای سیستمی قابل حذف نیستند
|
||||
systemKey String?
|
||||
users User[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([organizationId, name])
|
||||
@@index([organizationId])
|
||||
}
|
||||
|
||||
model Company {
|
||||
|
||||
Reference in New Issue
Block a user