1
我有以下模式:虛擬財產不SequelizeJS工作
var moment = require('moment');
module.exports = function(sequelize, DataTypes) {
var Account = sequelize.define('Account', {
suspended: {
type: DataTypes.BOOLEAN,
defaultValue: false
}
}, {
getterMethods: {
trialDaysLeft: function() {
return 5;
}
},
tableName: 'accounts'
});
return Account;
};
我想trialDaysLeft當我打電話account.trialDaysLeft財產。
我越來越
TypeError: Property 'trialDaysLeft' of object [object Object] is not a function
我在哪裏錯了?