spee.ch/models/file.js

35 lines
599 B
JavaScript
Raw Normal View History

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
}
}, {
freezeTableName: true
});
2017-06-16 00:56:40 +02:00
return File;
}