{"size": 727, "ext": "js", "max_stars_repo_path": "models/InvestmentType.js", "max_stars_repo_name": "kizomanizo/roadmap-costing-backend", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/InvestmentType.js", "max_issues_repo_name": "kizomanizo/roadmap-costing-backend", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "models/InvestmentType.js", "max_forks_repo_name": "kizomanizo/roadmap-costing-backend", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.6086956522, "max_line_length": 138, "alphanum_fraction": 0.6863823934}
'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
  class InvestmentType extends Model {
    static associate(models) {
      InvestmentType.hasMany(models.Investment, { as: 'investments', foreignKey: 'investmenttype_id', onDelete: 'RESTRICT', hooks: true })
    }
  }
  InvestmentType.init({
    id: { primaryKey: true, type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4 },
    name: DataTypes.STRING,
    status: DataTypes.BOOLEAN,
    created_by: DataTypes.UUID,
    updated_by: DataTypes.UUID
  }, {
    sequelize,
    modelName: 'InvestmentType',
    tableName: 'investmenttypes',
    createdAt: 'created_at',
    updatedAt: 'updated_at'
  })
  return InvestmentType
}     