<commit_before>'use strict';

var mongoose = require('mongoose'),
	uniqueValidator = require('mongoose-unique-validator'),
	mongoosePaginate = require('mongoose-paginate'),
	BasicModel = require('./basic.model'),
	Constants = require('../constants');

class Team extends BasicModel {

	constructor () {
		super();
		this.schema = new mongoose.Schema({
			name: {
				type: String,
				trim: true,
				unique: true,
				index: true,
				required: true,
				minlength: BasicModel.constants().MIN_LENGTH
			},
			creationDate: {
				type: Date,
				default: Date.now
			},
			isRemoved: {
				type: Boolean,
				default: false
			},
			image: {
				type: String
			},
			masterleagueId: {
				type: String
			},
			website: {
				type: String
			},
			teamLiquidWikiUrl: {
				type: String
			},
			author: {
				type: mongoose.Schema.Types.ObjectId,
				required: true
			}<commit_msg>min length for team names set to 2 (thank you L5)<commit_after>'use strict';

const MIN_LENGTH = 2;

var mongoose = require('mongoose'),
	uniqueValidator = require('mongoose-unique-validator'),
	mongoosePaginate = require('mongoose-paginate'),
	BasicModel = require('./basic.model'),
	Constants = require('../constants');

class Team extends BasicModel {

	constructor () {
		super();
		this.schema = new mongoose.Schema({
			name: {
				type: String,
				trim: true,
				unique: true,
				index: true,
				required: true,
				minlength: MIN_LENGTH
			},
			creationDate: {
				type: Date,
				default: Date.now
			},
			isRemoved: {
				type: Boolean,
				default: false
			},
			image: {
				type: String
			},
			masterleagueId: {
				type: String
			},
			website: {
				type: String
			},
			teamLiquidWikiUrl: {
				type: String
			},
			author: {
				type: mongoose.Schema.Types.ObjectId,
				required: true
			}
{'fraction_non_alphanumeric': 0.13318534961154274, 'fraction_numerical': 0.001664816870144284, 'mean_word_length': 2.8525641025641026, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7560062', 'n_tokens_mistral': 755, 'n_tokens_neox': 598, 'n_words': 137}