fetching convos with current state for user and combining to master convos
This commit is contained in:
@@ -3,15 +3,20 @@ import { ConversationMember } from "./conversation.model";
|
||||
import { ObjectId } from "mongodb";
|
||||
|
||||
export default class MasterConversation {
|
||||
// attributes of conversation
|
||||
id: ObjectId; // id of the conversation
|
||||
name?: string;
|
||||
createdDate: Date;
|
||||
lastUpdatedDate: Date;
|
||||
constructor(
|
||||
// attributes of conversation
|
||||
public id: ObjectId, // id of the conversation
|
||||
|
||||
// compiled data for easy client read
|
||||
currentUserMember: ConversationMember;
|
||||
otherMembers: ConversationMember[];
|
||||
public createdDate: Date,
|
||||
public lastUpdatedDate: Date,
|
||||
|
||||
audioClips: AudioClip[];
|
||||
// compiled data for easy client read
|
||||
public currentUserMember?: ConversationMember,
|
||||
|
||||
public otherMembers?: ConversationMember[],
|
||||
|
||||
public audioClips: AudioClip[] = [],
|
||||
|
||||
public name?: string
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import { Conversation } from "../models/conversation.model";
|
||||
|
||||
export default class GetUserConversationsResponse {
|
||||
constructor(public convos: Conversation[]) {}
|
||||
}
|
||||
Reference in New Issue
Block a user