{"size": 701, "ext": "js", "max_stars_repo_path": "models/voucher.js", "max_stars_repo_name": "CoolestProjectsBelgium/coolestproject-backend", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/voucher.js", "max_issues_repo_name": "CoolestProjectsBelgium/coolestproject-backend", "max_issues_repo_issues_event_min_datetime": "2021-01-17T13:28:49.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-19T19:18:16.000Z", "max_forks_repo_path": "models/voucher.js", "max_forks_repo_name": "CoolestProjectsBelgium/coolestproject-backend", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 16, "max_forks_count": null, "avg_line_length": 26.9615384615, "max_line_length": 72, "alphanum_fraction": 0.6291012839}
'use strict';
const {
  Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
  class Voucher 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) {
      Voucher.belongsTo(models.Project, { as: 'project' });
      Voucher.belongsTo(models.User, { as: 'participant' });
      Voucher.belongsTo(models.Event, { as: 'event', optional: false });
    }
  }
  Voucher.init({
    id: { type: DataTypes.UUID, primaryKey: true },
  }, {
    sequelize,
    modelName: 'Voucher',
  });
  return Voucher;
};
