synt_backend
Version:
Synt light-weight node backend service
33 lines (30 loc) • 827 B
JavaScript
const { Model } = require("sequelize");
module.exports = (sequelize, DataTypes) => {
class Reminder extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
Reminder.belongsTo(models.VME);
Reminder.belongsTo(models.Label);
}
}
Reminder.init(
{
recipient: DataTypes.ENUM("synt", "custom", "owners", "everyone"),
dateOfReceiving: DataTypes.STRING,
users: DataTypes.STRING,
active: DataTypes.BOOLEAN,
type: DataTypes.ENUM("message", "unpaid provision"),
},
{
sequelize,
modelName: "Reminder",
}
);
return Reminder;
};
;