feat: Introduce default profile sections and fields, updating schema with isSystem and isSearchableOnly properties.

This commit is contained in:
pradeepkumar
2026-01-24 12:49:25 +05:30
parent 710803a3ec
commit 43b422a81e
4 changed files with 145 additions and 2 deletions

View File

@@ -224,6 +224,7 @@ model ProfileSection {
sortOrder Int @default(0)
isActive Boolean @default(true)
isGlobal Boolean @default(false) // If true, applies to ALL agent types
isSystem Boolean @default(false) // If true, section cannot be deleted (system default)
// Timestamps
createdAt DateTime @default(now())
@@ -234,6 +235,7 @@ model ProfileSection {
agentTypeSections AgentTypeSection[]
@@index([isActive])
@@index([isSystem])
@@index([sortOrder])
@@map("profile_sections")
}
@@ -273,6 +275,7 @@ model ProfileField {
sortOrder Int @default(0)
isActive Boolean @default(true)
isRequired Boolean @default(false)
isSearchableOnly Boolean @default(false) // If true, shown in edit form & search, but hidden on public profile
// Validation rules (JSON)
validation Json? // { min, max, minLength, maxLength, pattern, etc. }