const mongoose = require('mongoose');
const {mongooseConstantValues} = require('../apps/common/systemConstents')

const marketplaceSubscribes = new mongoose.Schema({
	// shopifyProductId = spId
	// product_id = pId
	// date_of_subscription = dos
	// date_of_modification = dom
	// merchant_id = mId
	// am_status amazon product subscribe status
	mId:{
		type:Object
	}, 
	pId:{
		type:Object
	}, 
	am_status:{
		type:Number,
		default: 0
	}, 
	margin:{
		type: Number, 
	},
	dos:{
		type:Date
	},
	dom:{
		type:Date
	},
	sku:{
		type:String
	},
	asin:{
		type:String
	},
	a_price:{
		type: Number,
	},
	a_quantity:{
		type: Number,
	},
	[mongooseConstantValues.IS_AMAZON_PRODUCT_UPLOADED]:{
		type: Number, 
	}, 
	[mongooseConstantValues.IS_AMAZON_PRODUCT_PRICE_UPDATE]:{
		type: Number, 
	}, 
	[mongooseConstantValues.IS_AMAZON_PRODUCT_IMAGE_UPDATE]:{
		type: Number, 
	}, 
	[mongooseConstantValues.IS_AMAZON_PRODUCT_INVENTORY_UPDATE]:{
		type: Number, 
	},
	[mongooseConstantValues.IS_AMAZON_PRODUCT_RELATIONSHIP_UPDATE]:{
		type: Number, 
	},
	channel:{
		type:String
	}
});
module.exports = mongoose.model('MarketplaceSubscribes', marketplaceSubscribes)
