import Column from "@entity-access/entity-access/dist/decorators/Column.js"; import { RelateToOne } from "@entity-access/entity-access/dist/decorators/Relate.js"; import Table from "@entity-access/entity-access/dist/decorators/Table.js"; import Mailbox from "./Mailbox.js"; @Table("ChannelConfigs") export default class ChannelConfig { @Column({ dataType: "BigInt", key: true }) @RelateToOne(Mailbox, { property: (x) => x.mailbox, inverseProperty: (x) => x.channelConfig, dotNotCreateIndex: true }) public mailboxID: number; @Column({ dataType: "Char", nullable: true }) public inviteContent: string; /** If set, it will be sent to every joinee */ @Column({ dataType: "Char", nullable: true }) public welcomeContent: string; /** If set, we will send an invite to user to join the channel, * applicable only to public/invite only channels*/ @Column({ dataType: "Boolean", default: () => false}) public sendInviteOnEngagement: boolean; @Column({ dataType: "Boolean", default: () => false }) public memberOnlyEngagement: boolean; @Column({ dataType: "Boolean", default: () => false}) public notSafeForWork: boolean; /** * This will be added to every outgoing message... */ @Column({ dataType: "Char", nullable: true}) public postFooter: string; public mailbox: Mailbox; }