2019-05-04 18:41:50 +03:00
|
|
|
import { Entity, Column, PrimaryColumn } from "typeorm";
|
|
|
|
import { Attachment } from "eris";
|
|
|
|
import { StrictMessageContent } from "../../utils";
|
|
|
|
|
|
|
|
@Entity("scheduled_posts")
|
|
|
|
export class ScheduledPost {
|
|
|
|
@Column()
|
|
|
|
@PrimaryColumn()
|
|
|
|
id: number;
|
|
|
|
|
|
|
|
@Column() guild_id: string;
|
|
|
|
|
|
|
|
@Column() author_id: string;
|
|
|
|
|
|
|
|
@Column() author_name: string;
|
|
|
|
|
|
|
|
@Column() channel_id: string;
|
|
|
|
|
|
|
|
@Column("simple-json") content: StrictMessageContent;
|
|
|
|
|
|
|
|
@Column("simple-json") attachments: Attachment[];
|
|
|
|
|
|
|
|
@Column() post_at: string;
|
|
|
|
|
2019-12-01 23:23:34 +02:00
|
|
|
/**
|
|
|
|
* How often to post the message, in milliseconds
|
|
|
|
*/
|
|
|
|
@Column() repeat_interval: number;
|
|
|
|
|
|
|
|
@Column() repeat_until: string;
|
|
|
|
|
|
|
|
@Column() repeat_times: number;
|
|
|
|
|
2019-05-04 18:41:50 +03:00
|
|
|
@Column() enable_mentions: boolean;
|
|
|
|
}
|