const mongoose = require('mongoose');

const WInwardSchema = mongoose.Schema({
	 
	inv_number:{
       type: String,
	},
	mkpOrderId:{
		type: String, 
		default: null
	},
	cff_orderno:{
		type: String, 
	},
	order_status:{
		type: Number, 
		// initialize = 0, dispatch_from_warehouse = 1, in-transite = 2, deliever = 3, rto = 4, return = 5, qc = 6, in stock = 7, damage = 8, refund = 9
	},
	created_date:{
		type:Date,
		default: Date.now
	}, 
	/*dispatch_date:{
		type: Date, 
		default: null
	},
	cancel_date:{
		type: Date, 
		default: null
	},
	rto_date:{
		type: Date, 
		default: null
	},*/
	return_date:{
		type: Date, 
		default: null
	},
	
	spId:{
		type: Object, 
	}, 
	i_orderno:{
		type: String,
	},
	s_orderno:{
		type: String, 
	}, 
	description:{
		type: String, 
	},
	qty:{
		type: Number, 
	},
	unitPrice:{
		type: Number, 
	},
	totalPrice : {
		type: Number, 
	},
	rmbPrice : {
		type: Number, 
	}, 
	sku:{
		type: String, 
	},
	invoiceDate:{
		type: Date, 
	},
	spID:{
		type: String, 
	},
	returnReason:{
		type: String, 
	},
	remark:{
		type: String, 
	},
	qc:{
		type: String, 
	},
	claim:{
		type: Number, 
	},
	type:{
		type: String, 
	},
	account_name:{
		type: String,
	},
	rto_awb:{
		type: String, 
	},
	return_awb:{
		type: String,
	},
	refund_date:{
		type: Date, 
		default: null
	}
});
module.exports = mongoose.model('NotWInward', WInwardSchema)

// cond = Condition
