mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
35 lines
622 B
TypeScript
35 lines
622 B
TypeScript
import { Entity, Column, PrimaryColumn } from "typeorm";
|
|
|
|
export interface ISavedMessageData {
|
|
attachments?: object[];
|
|
author: {
|
|
username: string;
|
|
discriminator: string;
|
|
};
|
|
content: string;
|
|
embeds?: object[];
|
|
timestamp: number;
|
|
}
|
|
|
|
@Entity("messages")
|
|
export class SavedMessage {
|
|
@Column()
|
|
@PrimaryColumn()
|
|
id: string;
|
|
|
|
@Column() guild_id: string;
|
|
|
|
@Column() channel_id: string;
|
|
|
|
@Column() user_id: string;
|
|
|
|
@Column() is_bot: boolean;
|
|
|
|
@Column("simple-json") data: ISavedMessageData;
|
|
|
|
@Column() posted_at: string;
|
|
|
|
@Column() deleted_at: string;
|
|
|
|
@Column() is_permanent: boolean;
|
|
}
|