enum ConversationStatus {
  ACTIVE
}

enum ConversationType {
  CLIENT_VENDOR
  GROUP_STAFF
  STAFF_CLIENT 
  STAFF_ADMIN
  VENDOR_ADMIN
  CLIENT_ADMIN
  GROUP_ORDER_STAFF
}

type Conversation @table(name: "conversations") {
  id: UUID! @default(expr: "uuidV4()")

  subject: String
  status: ConversationStatus
  conversationType: ConversationType
  isGroup: Boolean
  groupName: String
  lastMessage: String
  lastMessageAt: Timestamp #lastTime

  createdAt: Timestamp @default(expr: "request.time")
  updatedAt: Timestamp @default(expr: "request.time")
  createdBy: String
}
