Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. module.exports = Mongoose => {
  2. const Schema = Mongoose.Schema
  3.  
  4. const assetSchema = new Schema({
  5. attributes: [{
  6. _field: {
  7. type: Schema.Types.ObjectId,
  8. ref: 'Field',
  9. required: true
  10. },
  11. value: {
  12. type: Schema.Types.Mixed,
  13. required: true
  14. }
  15. }],
  16. _partition: {
  17. type: Schema.Types.ObjectId,
  18. ref: 'Partition'
  19. }
  20. });
  21.  
  22. return Mongoose.model( 'Asset', assetSchema )
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement