Add per-user saved column visibility for tables
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -264,6 +264,7 @@ model User {
|
||||
billingAccount BillingAccount?
|
||||
auditLogs AuditLog[] @relation("AuditLogActor")
|
||||
savedViews SavedView[] @relation("SavedViewOwner")
|
||||
tablePreferences UserTablePreference[]
|
||||
assignedProjectCards ProjectCard[] @relation("ProjectCardAssignees")
|
||||
teamMemberships TeamMember[]
|
||||
reservationAssignments ReservationAppointment[] @relation("ReservationAssignee")
|
||||
@@ -1712,6 +1713,22 @@ model AuditLog {
|
||||
}
|
||||
|
||||
/// فیلترهای ذخیرهشده برای لیستها و کاریزها
|
||||
/// ستونهای مخفی هر جدول برای هر کاربر (بهازای هر سازمان)
|
||||
model UserTablePreference {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
organizationId String
|
||||
tableKey String
|
||||
/// ستون جدیدی که بعداً اضافه شود بهصورت پیشفرض نمایش داده میشود
|
||||
hiddenColumns String[] @default([])
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([userId, organizationId, tableKey])
|
||||
@@index([userId, organizationId])
|
||||
}
|
||||
|
||||
model SavedView {
|
||||
id String @id @default(cuid())
|
||||
organizationId String
|
||||
|
||||
Reference in New Issue
Block a user