mirror of
https://github.com/filecoffee/filehost.git
synced 2024-11-13 19:49:56 +01:00
32 lines
600 B
JavaScript
32 lines
600 B
JavaScript
|
const { DataTypes } = require("sequelize");
|
||
|
const sequelize = require("../../config/database.config");
|
||
|
|
||
|
const File = sequelize.define("File", {
|
||
|
filename: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
},
|
||
|
originalFileName: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
},
|
||
|
size: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
},
|
||
|
md5: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
},
|
||
|
labels: {
|
||
|
type: DataTypes.ARRAY(DataTypes.STRING),
|
||
|
allowNull: false,
|
||
|
},
|
||
|
userId: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
},
|
||
|
});
|
||
|
|
||
|
module.exports = File;
|