19 lines
497 B
JavaScript
Raw Normal View History

2019-11-23 23:08:03 +02:00
module.exports = function (sequelize, DataTypes, options) {
var model = sequelize.define("session", {
sid: {
type: DataTypes.STRING,
primaryKey: true,
unique: true,
},
expires: DataTypes.DATE,
data: DataTypes.STRING(50000)
}, {
comment: "Each session in the system will be stored in this table..."
});
model.associate = (db) => {
model.User = model.belongsTo(db.User);
}
return model;
};