import { Contract } from "@/db/schema/contract" type VirtualColumns = 'esignStatus' // Create a union type combining real and virtual columns export interface PoColumnConfig { id: keyof Contract | VirtualColumns label: string group?: string excelHeader?: string type?: string customType?: string // Add this to the base interface } export const poColumnsConfig: PoColumnConfig[] = [ { id: "id", label: "ID", excelHeader: "ID", // group: "Key Info", type: "number", }, { id: "projectId", label: "Project ID", excelHeader: "Project ID", // group: "Key Info", type: "number", }, { id: "vendorId", label: "Vendor ID", excelHeader: "Vendor ID", // group: "Key Info", type: "number", }, { id: "contractNo", label: "Form Code", excelHeader: "Form Code", // group: "Basic Info", type: "text", }, { id: "contractName", label: "Contract Name", excelHeader: "Contract Name", // group: "Basic Info", type: "text", }, { id: "status", label: "Status", excelHeader: "Status", // group: "Basic Info", type: "text", }, { id: "esignStatus", // db에 없는 가상 컬럼 label: "E-Sign Status", excelHeader: "E-Sign Status", // group: "Basic Info", type: "custom", // 커스텀 렌더링이 필요함을 나타냄 customType: "esignStatus", // 구분이 필요한 경우 추가 필드 }, { id: "startDate", label: "Start Date", excelHeader: "Start Date", // group: "Dates", type: "date", }, { id: "endDate", label: "End Date", excelHeader: "End Date", // group: "Dates", type: "date", }, { id: "paymentTerms", label: "Payment Terms", excelHeader: "Payment Terms", // group: "PO Info", type: "text", }, { id: "deliveryTerms", label: "Delivery Terms", excelHeader: "Delivery Terms", // group: "PO Info", type: "text", }, { id: "deliveryDate", label: "Delivery Date", excelHeader: "Delivery Date", // group: "PO Info", type: "date", }, { id: "deliveryLocation", label: "Delivery Location", excelHeader: "Delivery Location", // group: "PO Info", type: "text", }, { id: "currency", label: "Currency", excelHeader: "Currency", // group: "Money", type: "text", }, { id: "totalAmount", label: "Total Amount", excelHeader: "Total Amount", // group: "Money", type: "number", }, { id: "discount", label: "Discount", excelHeader: "Discount", // group: "Money", type: "number", }, { id: "tax", label: "Tax", excelHeader: "Tax", // group: "Money", type: "number", }, { id: "shippingFee", label: "Shipping Fee", excelHeader: "Shipping Fee", // group: "Money", type: "number", }, { id: "netTotal", label: "Net Total", excelHeader: "Net Total", // group: "Money", type: "number", }, { id: "partialShippingAllowed", label: "Partial Shipping", excelHeader: "Partial Shipping", // group: "Options", type: "boolean", }, { id: "partialPaymentAllowed", label: "Partial Payment", excelHeader: "Partial Payment", // group: "Options", type: "boolean", }, { id: "remarks", label: "Remarks", excelHeader: "Remarks", // group: "Notes", type: "text", }, { id: "version", label: "Version", excelHeader: "Version", // group: "Versioning", type: "number", }, { id: "createdAt", label: "Created At", excelHeader: "Created At", // group: "System Info", type: "date", }, { id: "updatedAt", label: "Updated At", excelHeader: "Updated At", // group: "System Info", type: "date", }, ]