underbbs/ts/message.ts

35 lines
934 B
TypeScript
Raw Normal View History

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