Deploy rule, CRM enhancements, Company Employee category, bilingual, contacts module completion
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -134,6 +134,7 @@ model Employee {
|
||||
|
||||
// Relations
|
||||
user User?
|
||||
contact Contact?
|
||||
attendances Attendance[]
|
||||
leaves Leave[]
|
||||
salaries Salary[]
|
||||
@@ -401,6 +402,10 @@ model Contact {
|
||||
categories ContactCategory[]
|
||||
tags String[]
|
||||
|
||||
// HR Link - for Company Employee category
|
||||
employeeId String? @unique
|
||||
employee Employee? @relation(fields: [employeeId], references: [id])
|
||||
|
||||
// Hierarchy - for companies/entities
|
||||
parentId String?
|
||||
parent Contact? @relation("ContactHierarchy", fields: [parentId], references: [id])
|
||||
@@ -442,6 +447,9 @@ model Contact {
|
||||
@@index([mobile])
|
||||
@@index([taxNumber])
|
||||
@@index([commercialRegister])
|
||||
@@index([source])
|
||||
@@index([createdAt])
|
||||
@@index([parentId])
|
||||
@@map("contacts")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user