module.exports = Self => { Self.remoteMethod('itemShelvingSaleByCollection', { description: 'Insert sales of the collection in itemShelvingSale', accessType: 'WRITE', accepts: [ { arg: 'id', type: 'number', description: 'The collection id', required: true, http: {source: 'path'} } ], http: { path: `/:id/itemShelvingSaleByCollection`, verb: 'POST' } }); Self.itemShelvingSaleByCollection = async id => { await Self.rawSql(`CALL vn.itemShelvingSale_addByCollection(?)`, [id]); }; };