var countrySchema = new mongoose.Schema({
capitalId: {type:String}
});
countrySchema.virtual('capital',{
ref: 'City',
localField: 'capitalId',
foreignField: '_id',
justOne: true
});
countrySchema.set('toObject', { virtuals: true });
countrySchema.set('toJSON', { virtuals: true });