spee.ch/models/stats.js

30 lines
543 B
JavaScript
Raw Normal View History

2017-06-28 07:04:15 +02:00
module.exports = (sequelize, { STRING, TEXT }) => {
2017-06-29 23:34:23 +02:00
const Stats = sequelize.define(
'Stats',
{
action: {
type : STRING,
allowNull: false,
},
url: {
type : STRING,
allowNull: false,
},
ipAddress: {
type : STRING,
allowNull: true,
2017-06-28 06:32:05 +02:00
default : null,
},
result: {
2017-06-28 07:04:15 +02:00
type : TEXT('long'),
2017-06-28 06:32:05 +02:00
allowNull: true,
default : null,
},
},
{
freezeTableName: true,
}
);
2017-06-29 23:34:23 +02:00
return Stats;
};