Deploy rule, CRM enhancements, Company Employee category, bilingual, contacts module completion

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Talal Sharabi
2026-02-19 14:59:34 +04:00
parent 0b126cb676
commit 680ba3871e
51 changed files with 11456 additions and 477 deletions

View File

@@ -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")
}