UNPKG

synt_backend

Version:

Synt light-weight node backend service

29 lines (28 loc) 715 B
"use strict"; const { Model } = require("sequelize"); module.exports = (sequelize, DataTypes) => { class ChangeRequest 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 ChangeRequest.belongsTo(models.User); } } ChangeRequest.init( { description: DataTypes.STRING, old_value: DataTypes.STRING, new_value: DataTypes.STRING, is_done: DataTypes.BOOLEAN, }, { sequelize, modelName: "ChangeRequest", } ); return ChangeRequest; };