underbbs/ts/message.ts

35 lines
No EOL
934 B
TypeScript

export class Message {
public id: string = "";
public uri: string = "";
public protocol: string = "";
public adapter: string = "";
public author: string = ""
public content: string = "";
public attachments: Attachment[] = [];
public replyTo: string | null = null;
public replies: string[] = [];
public mentions: string[] = [];
public created: Date = new Date();
public edited: Date | null = null;
public visibility: string = "public";
}
export class Author {
public id: string = "";
public uri: string = "";
public protocol: string = "";
public adapter: string = "";
public name: string = "";
public profileData: any = {};
public profilePic: string = "";
public messages: string[] = [];
}
export class Attachment {
public Src: string = "";
public ThumbSrc: string = "";
public Desc: string = "";
public CreatedAt: Date = new Date();
}
export default { Message, Attachment, Author }