UNPKG

water-orm

Version:

A monolith version of Standalone waterline ORM

30 lines (24 loc) 552 B
/** * Dependencies */ var path = require('path'); var Waterline = require(path.join(process.cwd(),'lib/waterline.js')); module.exports = Waterline.Collection.extend({ tableName: 'taxiTable', identity: 'taxi', connection: 'associations2', // migrate: 'drop', attributes: { medallion: 'integer', model: 'string', drivers: { collection: 'driver', via: 'taxis' }, toJSON: function() { var obj = this.toObject(); delete obj.medallion; return obj; } } });