astarting data stuff

This commit is contained in:
Arjun Patel
2022-02-02 21:51:09 -08:00
parent f76d299b89
commit 5203211e55
8 changed files with 181 additions and 30 deletions
-16
View File
@@ -1,22 +1,6 @@
import { v4 as uuid } from "uuid";
import { Timestamp } from "firebase/firestore";
export class CompleteConversation {
id: string; // conversation id
conversation: Conversation;
constructor(convo: Conversation) {
this.conversation = convo;
this.id = this.conversation.id;
}
userMember?: ConversationMember;
members: ConversationMember[] = [] as ConversationMember[];
audioClips: AudioClip[] = [] as AudioClip[];
links: Link[] = [] as Link[];
}
export default class Conversation {
id: string = uuid();
@@ -41,6 +41,7 @@ export default class ConversationService {
{
...conversation,
createdDate: serverTimestamp(),
lastActivityDate: serverTimestamp(),
},
{ merge: true }
);