UNPKG

synt_backend

Version:

Synt light-weight node backend service

35 lines (34 loc) 883 B
"use strict"; const { Model } = require("sequelize"); module.exports = (sequelize, DataTypes) => { class FixedMeetingItem 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 FixedMeetingItem.hasMany(models.MeetingItem); } } FixedMeetingItem.init( { name: DataTypes.STRING, description: DataTypes.STRING, is_vote_required: DataTypes.BOOLEAN, majority: DataTypes.FLOAT, template: DataTypes.ENUM( "budget_amount", "budget_frequency", "guarantee_fund", "reserve_capital" ), }, { sequelize, modelName: "FixedMeetingItem", } ); return FixedMeetingItem; };