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 { Email } from "./Email.js"; @Table("ExternalAttachments") export class ExternalAttachment { @Column({ dataType: "BigInt", key: true, generated: "identity" }) attachmentID: number; @Column({ dataType: "BigInt" }) @RelateTo(Email, { property:(x) => x.email, inverseProperty: (x) => x.externalAttachments }) emailID: number; @Column({ dataType: "Char", nullable: true }) contentID: string; @Column({ dataType: "Char", length: 400 }) public name: string; @Column({ dataType: "BigInt", default: () => 0}) public fileSize: number; @Column({ dataType: "Char", length: 200}) public contentType: string; @Column({ dataType: "AsciiChar", length: 10, nullable: true }) public contentDisposition: string; @Column({ dataType: "Char" }) link: string; email: Email; }