{"size": 1528, "ext": "js", "max_stars_repo_path": "server/models/video-stats.model.js", "max_stars_repo_name": "cusac/mbt.guide-backend", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server/models/video-stats.model.js", "max_issues_repo_name": "cusac/mbt.guide-backend", "max_issues_repo_issues_event_min_datetime": "2019-12-17T05:10:04.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-20T21:54:25.000Z", "max_forks_repo_path": "server/models/video-stats.model.js", "max_forks_repo_name": "cusac/mbt.guide-backend", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 36, "max_forks_count": null, "avg_line_length": 20.1052631579, "max_line_length": 38, "alphanum_fraction": 0.5137434555}
'use strict';

module.exports = function (mongoose) {
  var modelName = 'videoStats';
  var Types = mongoose.Schema.Types;
  var Schema = new mongoose.Schema(
    {
      tagsCreated: {
        type: Types.Number,
        required: true,
      },
      videosStarted: {
        type: Types.Number,
        required: true,
      },
      videosCompleted: {
        type: Types.Number,
        required: true,
      },
      segmentsCreated: {
        type: Types.Number,
        required: true,
      },
      hoursProcessed: {
        type: Types.Number,
        required: true,
      },
      mostUsedTags: {
        type: [Types.Object],
        required: true,
      },
      topContributers: {
        type: [Types.Object],
        required: true,
      },
      totalVideos: {
        type: Types.Number,
        required: true,
      },
      totalSegmentViews: {
        type: Types.Number,
        required: true,
      },
      topViewedSegments: {
        type: [Types.Object],
        required: true,
      },
      totalSearches: {
        type: Types.Number,
        required: true,
      },
      topSearchTerms: {
        type: [Types.Object],
        required: true,
      },
    },
    { collection: modelName }
  );

  Schema.statics = {
    collectionName: modelName,
    routeOptions: {
      alias: 'video-stats',
      readAuth: false,
      allowCreate: false,
      allowUpdate: false,
      allowAssociate: false,
      routeScope: {
        rootScope: 'root',
      },
    },
  };

  return Schema;
};
