adding route for the getting of conversation details
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { ObjectId } from "mongodb";
|
||||
|
||||
export default class Content {
|
||||
constructor(
|
||||
public relationshipId: string, // if it's a one on one, this will be the relationship Id
|
||||
public sentDate: Date,
|
||||
public contentUrl: string,
|
||||
public contentData: string,
|
||||
public contentType: ContentType,
|
||||
public _id?: ObjectId,
|
||||
public listenedDate?: Date
|
||||
) {}
|
||||
}
|
||||
|
||||
export enum ContentType {
|
||||
link = "LINK",
|
||||
audioClip = "AUDIO_CLIP",
|
||||
text = "TEXT",
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import { ObjectId } from "mongodb";
|
||||
|
||||
export default class Relationship {
|
||||
constructor(
|
||||
public senderUserId: string,
|
||||
public senderUserId: string, // sender as the one to initiate the relationship
|
||||
public receiverUserId: string,
|
||||
public state: RelationshipState,
|
||||
public createdDate: Date = new Date(),
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import Content from "../models/content.model";
|
||||
import Relationship from "../models/relationship.model";
|
||||
import { User } from "@nirvana/core/models";
|
||||
|
||||
export default class GetConversationDetailsResponse {
|
||||
// get the messages for this conversation for like last 7 days or just a count of them until we paginate?
|
||||
|
||||
constructor(
|
||||
public contactUser: User,
|
||||
isLiveOrPinned: boolean,
|
||||
public ourRelationship?: Relationship,
|
||||
public latestContent?: Content[]
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user