enum ConversationType {
  CLIENT_VENDOR
  STAFF_CLIENT
  STAFF_ADMIN
  VENDOR_ADMIN
  CLIENT_ADMIN
  GROUP_STAFF
  GROUP_EVENT_STAFF
}

enum ConversationStatus {
  ACTIVE
  ARCHIVED
  CLOSED
}

type Conversation @table(name: "conversations") {
  id: UUID! @default(expr: "uuidV4()")
  participants: String!          # participants (jsonb -> String, required array of strings)
  conversationType: ConversationType! 
  relatedTo: UUID!              # related_to (generic FK as string)
  status: ConversationStatus
  createdDate: Timestamp @default(expr: "request.time")
  updatedDate: Timestamp @default(expr: "request.time")
  createdBy: String @default(expr: "auth.uid")
}
