Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = Mongoose => {
- const Schema = Mongoose.Schema
- const assetSchema = new Schema({
- attributes: [{
- _field: {
- type: Schema.Types.ObjectId,
- ref: 'Field',
- required: true
- },
- value: {
- type: Schema.Types.Mixed,
- required: true
- }
- }],
- _partition: {
- type: Schema.Types.ObjectId,
- ref: 'Partition'
- }
- });
- return Mongoose.model( 'Asset', assetSchema )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement