UNPKG

waterline-adapter-tests

Version:
33 lines (26 loc) 534 B
/** * Dependencies */ var Waterline = require('waterline'); module.exports = Waterline.Collection.extend({ tableName: 'paymentTable', identity: 'payment', connection: 'associations2', attributes: { amount: 'number', type: 'string', apartment: { model: 'apartment', columnName: 'apartment_id' }, a_customer: { model: 'Customer', columnName: 'customer_id' }, toJSON: function() { var obj = this.toObject(); delete obj.type; return obj; } } });