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 { HostedDomain } from "./HostedDomain.js"; import WebSite from "./WebSite.js"; /** * This association will display all public channels on the * website. Users will be able to create channel if signup * is enabled. */ @Table("WebSiteChannelDomains") export class WebSiteChannelDomain { @Column({ dataType: "BigInt", key: true }) @RelateTo(WebSite, { property: (x) => x.website, inverseProperty: (x) => x.channelDomains, foreignKeyConstraint: { name: "FC_WebSite_Channel_Domains_FolderID", onDelete: "cascade" } }) public folderID: number; @Column({ dataType: "BigInt", key: true }) @RelateTo(HostedDomain, { property: (x) => x.domain, inverseProperty: (x) => x.websiteChannelDomains, foreignKeyConstraint: { name: "FC_WebSiteChannelDomains_DomainID", onDelete: "cascade" } }) public domainID: number; public website: WebSite; public domain: HostedDomain; }