cleaning up more models and making sure that id is mongodb bson
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
import { ObjectId } from "mongodb";
|
||||
|
||||
export default class AudioClip {
|
||||
constructor(
|
||||
public _id: ObjectId,
|
||||
|
||||
public url: string,
|
||||
|
||||
public createdDate: Date = new Date(),
|
||||
public duration?: number
|
||||
) {}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ObjectId } from 'mongodb';
|
||||
|
||||
export interface IContent {
|
||||
id?: string;
|
||||
id?: ObjectId;
|
||||
|
||||
creatorUserId: string;
|
||||
contentUrl: string; // remote resource of file/media
|
||||
@@ -22,7 +22,8 @@ export class ContentBlock implements IContent {
|
||||
|
||||
public createdDate = new Date(),
|
||||
|
||||
public id?: string,
|
||||
public metadata?: object,
|
||||
public id?: ObjectId,
|
||||
) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ObjectId } from 'mongodb';
|
||||
import User from './user.model';
|
||||
|
||||
export default class Conversation {
|
||||
@@ -23,7 +24,7 @@ export default class Conversation {
|
||||
public lastUpdatedDate = new Date(),
|
||||
public createdDate = new Date(),
|
||||
|
||||
public id?: string,
|
||||
public id?: ObjectId,
|
||||
) {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user