import { ObjectId } from 'mongodb'; import { Attachment } from './attachment'; import { BaseModel } from './baseModel'; import { Customer } from './customer'; import { Location } from './location'; import { OperationCenter } from './operationCenter'; import { PaymentMode } from './paymentMode'; import { SKU } from './sku'; export interface WalkInSale extends BaseModel { date: Date; operationCenter: OperationCenter | ObjectId; code: string; customer: Customer | ObjectId; customerRemarks?: string; billTo: string; billingAddressLine1: string; billingAddressLine2?: string; billingAddressCity: string; billingAddressState: string; billingAddressCountry: string; billingAddressPincode: string; deliverTo: string; deliveryAddressLine1: string; deliveryAddressLine2?: string; deliveryAddressCity: string; deliveryAddressState: string; deliveryAddressCountry: string; deliveryAddressPincode: string; deliveryLocation?: Location; personName?: string; phoneNumber?: string; items: WalkInSaleItem[]; amount: number; payments?: WalkInSalePayment[]; attachments?: Attachment[]; invoice?: string; comments?: string; account?: string; } export interface WalkInSaleItem extends BaseModel { walkInSale: WalkInSale | ObjectId; date: Date; operationCenter: OperationCenter | ObjectId; customer: Customer | ObjectId; sku: SKU | ObjectId; quantityGradeA?: number; quantityGradeB?: number; quantity: number; amountGradeA?: number; amountGradeB?: number; amount: number; } export interface WalkInSalePayment extends BaseModel { walkInSale: WalkInSale | ObjectId; date: Date; operationCenter: OperationCenter | ObjectId; customer: Customer | ObjectId; paymentMode: PaymentMode | ObjectId; paymentReferenceNumber?: string; amount: number; }