| 21 | // mongoSchema.index({ teamId: 1, chatParticipantIds: 1 }, { unique: true }); |
| 22 | |
| 23 | interface IChatDocument extends mongoose.Document { |
| 24 | teamId: string; |
| 25 | chatCreatorId: string; |
| 26 | chatParticipantIds: string[]; |
| 27 | createdAt: Date; |
| 28 | lastUpdatedAt: Date; |
| 29 | initialMessages: any[]; |
| 30 | numberOfMessagesPerChat: number; |
| 31 | } |
| 32 | |
| 33 | interface IChatModel extends mongoose.Model<IChatDocument> { |
| 34 | getChatList({ userId, teamId }: { userId: string; teamId: string }): Promise<IChatDocument[]>; |
nothing calls this directly
no outgoing calls
no test coverage detected