index.js
function() {
  var self = this;

  molecuel.once('mlcl::elements::registrations:pre', function(module) {
    elements = module;

    self.wishlistSchema =  {
      name: { type: String, list: true, trim: true},
      creation: { type: Date, 'default': Date.now, form: {readonly: true}},
      entries: {
      },
      listelements: [{type: elements.Types.Mixed}]
    };

    _.each(molecuel.config.wishlist.types, function(type) {
      self.wishlistSchema.entries[type] = [{type: elements.ObjectId, ref: type}];
    });

    // module == elements module
    var schemaDefinition = {
      schemaName: 'wishlist',
      schema: self.wishlistSchema,
      options: {indexable: true, avoidTranslate: true}
    };

    molecuel.config.url.pattern.wishlist = '/wishlist/{{t _id}}';

    elements.registerSchemaDefinition(schemaDefinition);
  });

  return this;
}
function() {
  var self = this;

  molecuel.once('mlcl::elements::registrations:pre', function(module) {
    elements = module;

    self.wishlistSchema =  {
      name: { type: String, list: true, trim: true},
      creation: { type: Date, 'default': Date.now, form: {readonly: true}},
      entries: {
      },
      listelements: [{type: elements.Types.Mixed}]
    };

    _.each(molecuel.config.wishlist.types, function(type) {
      self.wishlistSchema.entries[type] = [{type: elements.ObjectId, ref: type}];
    });

    // module == elements module
    var schemaDefinition = {
      schemaName: 'wishlist',
      schema: self.wishlistSchema,
      options: {indexable: true, avoidTranslate: true}
    };

    molecuel.config.url.pattern.wishlist = '/wishlist/{{t _id}}';

    elements.registerSchemaDefinition(schemaDefinition);
  });

  return this;
}
function ( ) { var self = this ; molecuel . once ( 'mlcl::elements::registrations:pre' , function ( module ) { elements = module ; self . wishlistSchema = { name : { type : String , list : true , trim : true } , creation : { type : Date , 'default' : Date . now , form : { readonly : true } } , entries : { } , listelements : [ { type : elements . Types . Mixed } ] } ; _ . each ( molecuel . config . wishlist . types , function ( type ) { self . wishlistSchema . entries [ type ] = [ { type : elements . ObjectId , ref : type } ] ; } ) ; // module == elements module var schemaDefinition = { schemaName : 'wishlist' , schema : self . wishlistSchema , options : { indexable : true , avoidTranslate : true } } ; molecuel . config . url . pattern . wishlist = '/wishlist/{{t _id}}' ; elements . registerSchemaDefinition ( schemaDefinition ) ; } ) ; return this ; }
This module serves wishlist database element
@constructor
This module serves wishlist database element