feat(notes): let organizations edit the note category bar
The filter chips were fixed labels. Owners can rename, hide, reorder, and add categories. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -170,6 +170,7 @@ model Organization {
|
||||
deals Deal[]
|
||||
activities Activity[]
|
||||
notes Note[]
|
||||
noteCategories NoteCategory[]
|
||||
noteRevisions NoteRevision[]
|
||||
customFields CustomFieldDefinition[]
|
||||
products Product[]
|
||||
@@ -973,6 +974,26 @@ model Note {
|
||||
@@index([authorId])
|
||||
}
|
||||
|
||||
/// دستههای نوار فیلتر یادداشت؛ برای هر سازمان قابل تغییر است
|
||||
model NoteCategory {
|
||||
id String @id @default(cuid())
|
||||
organizationId String
|
||||
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
||||
key String
|
||||
label String
|
||||
tone String @default("general")
|
||||
position Int @default(0)
|
||||
isActive Boolean @default(true)
|
||||
/// در نوار «همه / معمولی / پیگیری / …» دیده شود
|
||||
showInBar Boolean @default(true)
|
||||
isSystem Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([organizationId, key])
|
||||
@@index([organizationId, position])
|
||||
}
|
||||
|
||||
/// اسنپشات متن قبل از هر ویرایش معنادار یادداشت
|
||||
model NoteRevision {
|
||||
id String @id @default(cuid())
|
||||
|
||||
Reference in New Issue
Block a user