{"size": 609, "ext": "js", "max_stars_repo_path": "src/library/mongoLib/model/example.js", "max_stars_repo_name": "datthaprasad-juego/njs2-demo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/library/mongoLib/model/example.js", "max_issues_repo_name": "datthaprasad-juego/njs2-demo", "max_issues_repo_issues_event_min_datetime": "2021-12-06T05:03:38.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-06T05:03:38.000Z", "max_forks_repo_path": "src/library/mongoLib/model/example.js", "max_forks_repo_name": "datthaprasad-juego/njs2-demo", "max_forks_repo_forks_event_min_datetime": "2021-11-15T05:17:51.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-14T08:36:13.000Z"}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 21.75, "max_line_length": 87, "alphanum_fraction": 0.6420361248}
let exampleModel;
const initExampleModel = async () => {
  try {
    if (exampleModel) return exampleModel;

    let exampleStructure = {
      example_id: {
        type: Number,
      },
      example_name: {
        type: String,
      },
    };

    let exampleScehma = await MONGOManager.createSchema(exampleStructure);
    await MONGOManager.createIndex(exampleScehma, { example_id: 1 }, "ExampleID");
    exampleModel = await MONGOManager.createModel("example", exampleScehma, "example");

    return exampleModel;
  } catch (err) {
    return null;
  }
};

module.exports = {
    initExampleModel,
};
