2017-07-12 01:55:03 +02:00
|
|
|
module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {
|
2017-06-29 23:34:23 +02:00
|
|
|
const Stats = sequelize.define(
|
|
|
|
'Stats',
|
2017-06-28 00:53:53 +02:00
|
|
|
{
|
|
|
|
action: {
|
|
|
|
type : STRING,
|
|
|
|
allowNull: false,
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
type : STRING,
|
|
|
|
allowNull: false,
|
|
|
|
},
|
|
|
|
ipAddress: {
|
|
|
|
type : STRING,
|
|
|
|
allowNull: true,
|
|
|
|
},
|
2017-07-11 02:51:29 +02:00
|
|
|
name: {
|
|
|
|
type : STRING,
|
|
|
|
allowNull: true,
|
|
|
|
},
|
|
|
|
claimId: {
|
|
|
|
type : STRING,
|
|
|
|
allowNull: true,
|
2017-07-12 01:55:03 +02:00
|
|
|
},
|
|
|
|
fileName: {
|
|
|
|
type : STRING,
|
|
|
|
allowNull: true,
|
|
|
|
},
|
|
|
|
fileType: {
|
|
|
|
type : STRING,
|
|
|
|
allowNull: true,
|
|
|
|
},
|
|
|
|
nsfw: {
|
|
|
|
type : BOOLEAN,
|
|
|
|
allowNull: true,
|
2017-07-11 02:51:29 +02:00
|
|
|
},
|
2017-06-28 00:53:53 +02:00
|
|
|
result: {
|
2017-06-28 07:04:15 +02:00
|
|
|
type : TEXT('long'),
|
2017-06-28 06:32:05 +02:00
|
|
|
allowNull: true,
|
|
|
|
default : null,
|
2017-06-28 00:53:53 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
freezeTableName: true,
|
|
|
|
}
|
|
|
|
);
|
2017-06-29 23:34:23 +02:00
|
|
|
return Stats;
|
2017-06-28 00:53:53 +02:00
|
|
|
};
|