const mongoose = require('mongoose');

const WmsordersSchema = mongoose.Schema({
	 
	orders_code:{
       type: String,
	},
	customer_id:{
		type: String, 
	},
	warehouse_id:{
		type: Number, 
	},
	consignee_first_name:{
		type:String
	}, 
	consignee_last_name:{
		type: String, 
	},
	consignee_company:{
		type: String, 
	},
	consignee_country_id:{
		type: String, 
	},
	consignee_zip:{
		type: String, 
	},
	consignee_region:{
		type: String, 
	},
	consignee_city:{
		type: String, 
	}, 
	consignee_address1:{
		type: String,
	},
	consignee_address2:{
		type: String, 
	}, 
	doorplate:{
		type: String, 
	},
	consignee_phone:{
		type: String, 
	},
	consignee_email:{
		type: String, 
	},
	shipping_method : {
		type: String, 
	},
	sub_shipping_method : {
		type: String, 
	}, 
	ship_area:{
		type: String, 
	},
	parcel_declared_value:{
		type: String, 
	},
	parcel_contents:{
		type: String, 
	},
	parcel_quantity:{
		type: String, 
	},
	order_attribute:{
		type: String, 
	},
	orders_status:{
		type: String, 
		// refund = 11
	},
	process_status:{
		type: Number, 
	},
	problem_status:{
		type: String, 
	},
	import_status:{
		type: String,
	},
	underreview_status:{
		type: String, 
	},
	shipping_fee_estimate:{
		type: String,
	},
	shipping_fee:{
		type: String,
	},
	currency:{
		type: String,
	},
	add_time:{
		type: Date,
		default: Date.now 
	},
	submit_time:{
		type: Date,
		default: Date.now 
	},
	package_time:{
		type: Date,
		default: Date.now 
	},
	ship_date:{
		type: Date,
		default: Date.now 
	},
	send_date:{
		type: Date,
		default: Date.now 
	},
	delivered_date:{
		type: Date,
		default: Date.now 
	},
	last_modified_time:{
		type: Date,
		default: Date.now 
	},
	order_stop_date:{
		type: Date,
		default: Date.now 
	},
	import_time:{
		type: Date,
		default: Date.now 
	},
	print_time:{
		type: Date,
		default: Date.now 
	},
	order_print_id:{
		type: String,
	},
	orders_print_type:{
		type: String,
	},
	customer_order_code:{
		type: String,
	},
	init_pickup_user_id:{
		type: String,
	},
	pickup_user_id:{
		type: String,
	},
	package_user_id:{
		type: String,
	},
	outbound_user_id:{
		type: String,
	},
	sorting_user_id:{
		type: String,
	},
	remark:{
		type: String,
	},
	is_special_order:{
		type: String,
	},
	order_print_area:{
		type: String,
	},
	order_type:{
		type: String,
	},
	order_area_mixed:{
		type: String,
	},
	evaluate:{
		type: String,
	},
	cn_region_id:{
		type: String,
	},
	package_type:{
		type: String,
	},
	isreturn:{
		type: String,
	},
	withbattery:{
		type: String,
	},
	pay_by:{
		type: String,
	},
	taxes_number:{
		type: String,
	},
	is_remote:{
		type: String,
	},
	is_pdapickup:{
		type: String,
	},
	customer_label:{
		type: String,
	},
	vat_fee:{
		type: String,
	},
	duty_forward:{
		type: String,
	},
	operation_mode:{
		type: String,
	},
	signature:{
		type: String,
	},
	order_item:{
		type: String,
	},
	orders_from:{
		type: String,
	},
	operator:{
		type: String,
	},
	custom_alone:{
		type: String,
	},
	cod_amount:{
		type: String,
	},
	sub_process_status:{
		type: String,
	},
	supplier:{
		type: String,
	},
	posun_create_user:{
		type: String,
	},
	is_labelling:{
		type: String,
	},
	product:{ type: Array },
	ordership:{ type: Array },
	refund_date:{
		type: Date, 
		default: null
	}
});
module.exports = mongoose.model('Wmsorder', WmsordersSchema)
