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 AppFile from "./AppFile.js"; import Tag from "./Tag.js"; @Table("AppFileTags") export default class AppFileTag { @Column({ dataType: "BigInt", key: true, order: 1}) @RelateTo(AppFile, { property: (aft) => aft.file, inverseProperty: (af) => af.tags, foreignKeyConstraint: { onDelete: "cascade" } }) public appFileID: number; @Column({ dataType: "BigInt", key: true, order: 2}) @RelateTo(Tag, { property: (aft) => aft.tag, inverseProperty: (t) => t.fileTags, foreignKeyConstraint: { onDelete: "cascade" } }) public tagID: number; public file: AppFile; public tag: Tag; }