UNPKG

synt_backend

Version:

Synt light-weight node backend service

29 lines (28 loc) 681 B
"use strict"; const { Model } = require("sequelize"); module.exports = (sequelize, DataTypes) => { class ReportType 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 ReportType.belongsToMany(models.Supplier, { through: "ReportTypeSupplier", }); } } ReportType.init( { name: DataTypes.STRING, category: DataTypes.STRING, }, { sequelize, modelName: "ReportType", } ); return ReportType; };