{"size": 849, "ext": "js", "max_stars_repo_path": "models/batch-context.js", "max_stars_repo_name": "ARW2705/BrewIO-Server", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/batch-context.js", "max_issues_repo_name": "ARW2705/BrewIO-Server", "max_issues_repo_issues_event_min_datetime": "2020-03-11T21:05:09.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-08T09:47:11.000Z", "max_forks_repo_path": "models/batch-context.js", "max_forks_repo_name": "ARW2705/BrewIO-Server", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 22.3421052632, "max_line_length": 62, "alphanum_fraction": 0.6866902238}
'use strict';

const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const grainBillSchema = require('./grain-bill');
const hopsScheduleSchema = require('./hops-schedule');
const yeastBatchSchema = require('./yeast-batch');
const otherIngredientsSchema = require('./other-ingredients');
const imageSchema = require('./image');

const contextSchema = new Schema({
  recipeMasterName: {
    type: String,
    required: true
  },
  recipeVariantName: {
    type: String,
    required: true
  },
  recipeImage: imageSchema,
  boilVolume: {
    type: Number,
    required: true
  },
  batchVolume: {
    type: Number,
    required: true
  },
  grains: [ grainBillSchema ],
  hops: [ hopsScheduleSchema ],
  yeast: [ yeastBatchSchema ],
  otherIngredients: [ otherIngredientsSchema ]
}, {
  _id: false
});

module.exports = contextSchema;
