Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mongoose = require('mongoose');
- var locCoordSchema = require.main.require('./models/locCoordSchema.js').shema;
- var mySchema= new Schema({
- coordinate:{type:locCoordSchema,default:null}
- });
- var mongoose = require('mongoose');
- var Schema = mongoose.Schema;
- var locCoordSchema = new Schema({
- 'type': { type: String, enum: ['Point', 'LineString', 'Polygon'], default: 'Point' },
- coordinates: { type: [Number], default: [0, 0] }
- });
- module.exports = mongoose.model('locCoordSchema', locCoordSchema);
Add Comment
Please, Sign In to add comment