File

src/chatbot/entities/message.entity.ts

Index

Properties

Constructor

constructor(partial: Partial<Message>)
Parameters :
Name Type Optional
partial Partial<Message> No

Properties

chatId
Type : number
content
Type : MessageContent
Optional createdAt
Type : Date
id
Type : number
status
Type : string
type
Type : string
userId
Type : string
export class Message {
  id: number;
  content: MessageContent;
  userId: string;
  type: string;
  createdAt?: Date;
  chatId: number;
  status: string;

  constructor(partial: Partial<Message>) {
    Object.assign(this, partial);
  }
}

export interface MessageContent {
  text: string;
  data: any;
}

export enum MessageStatus {
  SUCCESS = "SUCCESS",
  ERROR = "ERROR",
}

export enum MessageType {
  AI = "AI",
  USER = "USER",
}

results matching ""

    No results matching ""