fixing things regarding bson error with node and such...now working?

This commit is contained in:
talksik
2022-04-03 09:04:25 -04:00
parent 7205fac3f5
commit 19b90b2196
11 changed files with 248 additions and 41 deletions
+13 -12
View File
@@ -1,25 +1,26 @@
import { ObjectId } from "mongodb";
export class Conversation {
_id: ObjectId;
name?: string;
createdDate: Date;
lastUpdatedDate: Date;
constructor() {}
constructor(
public _id?: ObjectId,
public createdDate: Date = new Date(),
public lastUpdatedDate: Date = new Date()
) {}
}
export class ConversationMember {
_id: ObjectId;
constructor(
// unique constraint
public conversationId: ObjectId,
public userId: ObjectId,
// unique constraint
conversationId: ObjectId;
userId: ObjectId;
public state: ConversationMemberState = ConversationMemberState.INVITED,
state: ConversationMemberState;
createdDate: Date;
public createdDate: Date = new Date(),
public _id?: ObjectId
) {}
}
export enum ConversationMemberState {