Created
January 25, 2019 17:21
-
-
Save codemariner/751e3361d9e90c84d77809830160c6b6 to your computer and use it in GitHub Desktop.
Revisions
-
codemariner created this gist
Jan 25, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ export type DbFields<T> = { [K in keyof T]-?: T[K] | null; } export interface OrderFields { currency?: string; customerId?: string; customerName?: string; creationDate?: Date; email?: string; lastModified?: Date; orderId?: string; orderNo?: string; orderStatusId?: number; orderTotal?: number; productTotal?: number; recordCreated?: Date; recordUpdated?: Date; region?: string; shippingTotal?: number; siteId?: string; taxTotal?: number; } export type NewOrderData = DbFields<OrderFields> & { orderStatusId: number; orderNo: string; } export type OrderData = DbFields<OrderFields> & { orderId: number; orderStatusId: number; recordCreated: Date; recordUpdated: Date; }