2017-06-15 20:15:13 +02:00
|
|
|
module.exports = function(sequelize, DataTypes){
|
2017-06-16 00:56:40 +02:00
|
|
|
var File = sequelize.define("File", {
|
|
|
|
name: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false
|
|
|
|
},
|
2017-06-16 19:07:31 +02:00
|
|
|
claim_id: {
|
2017-06-16 00:56:40 +02:00
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false
|
|
|
|
},
|
2017-06-16 19:07:31 +02:00
|
|
|
outpoint: {
|
2017-06-16 00:56:40 +02:00
|
|
|
type: DataTypes.STRING,
|
2017-06-16 19:07:31 +02:00
|
|
|
allowNull: false
|
2017-06-16 00:56:40 +02:00
|
|
|
},
|
2017-06-16 19:07:31 +02:00
|
|
|
file_name: {
|
2017-06-16 00:56:40 +02:00
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false
|
|
|
|
},
|
2017-06-16 19:07:31 +02:00
|
|
|
file_path: {
|
2017-06-16 00:56:40 +02:00
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false
|
|
|
|
},
|
2017-06-16 19:07:31 +02:00
|
|
|
file_type: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
},
|
2017-06-16 00:56:40 +02:00
|
|
|
nsfw: {
|
|
|
|
type: DataTypes.BOOLEAN,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: false
|
|
|
|
}
|
|
|
|
}, {
|
2017-06-15 20:15:13 +02:00
|
|
|
freezeTableName: true
|
|
|
|
});
|
2017-06-16 00:56:40 +02:00
|
|
|
return File;
|
2017-06-15 20:15:13 +02:00
|
|
|
}
|