import Column from "@entity-access/entity-access/dist/decorators/Column.js"; import { RelateTo } 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"; import WebSite from "./WebSite.js"; @Table("WebSiteChannels") export class WebSiteChannel { @Column({ dataType: "BigInt", key: true }) @RelateTo(WebSite, { property: (x) => x.website, inverseProperty: (x) => x.channels, foreignKeyConstraint: { name: "FC_WebSite_Channels_FolderID", onDelete: "cascade" } }) public folderID: number; @Column({ dataType: "BigInt", key: true }) @RelateTo(Mailbox, { property: (x) => x.channel, inverseProperty: (x) => x.websiteChannels }) public channelID: number; public website: WebSite; public channel: Mailbox; }