import { TableColumn } from 'typeorm'; /** * Creates a TableColumn definition for a foreign key column. * * @param name - The name of the column. * @param isPrimary - Optional flag indicating if the column is a primary key. Defaults to false. * @param isNullable - Optional flag indicating if the column allows null values. Defaults to false. * @returns {TableColumn} - A TableColumn object configured as a foreign key column. */ export const foreignColumn = ({ name, isPrimary = false, isNullable = false, }: { name: string; isPrimary?: boolean; isNullable?: boolean; }): TableColumn => { return { name, type: 'int', unsigned: true, isPrimary, isNullable, } as TableColumn; };