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 { StoreAccount } from "./StoreAccount.js"; @Table("StoreAccountPhones") export default class StoreAccountPhone { @Column({ dataType:"BigInt", key: true }) @RelateTo(StoreAccount, { property: (x) => x.storeAccount, inverseProperty: (x) => x.phones, foreignKeyConstraint: { name: "FC_StoreAccountPhone_StoreID", onDelete: "cascade" } }) accountID: number; @Column({ dataType:"Char", length: 200, key: true }) phoneNumberE64: string; @Column({ dataType: "Char", length: 50, nullable: true }) type: string; @Column({ dataType: "Char", nullable: true }) notes: string; storeAccount: StoreAccount; }