<commit_before>import { createSchema } from 'mongoose-model-decorators';

export default () => {
  class Media {
    static schema = {
      artist: { type: String, max: 128, required: true },
      title: { type: String, max: 128, required: true },
      duration: { type: Number, min: 0, default: 0 },
      thumbnail: { type: String, max: 256, default: '' },
      sourceID: { type: String, max: 128, required: true },
      sourceType: { type: String, max: 128, required: true },
      nsfw: { type: Boolean, default: false },
      restricted: [{ type: String, max: 2 }]
    };
  }

  return createSchema({ minimize: false })(Media);
};<commit_msg>model: add "sourceData" to Media schema<commit_after>import { createSchema } from 'mongoose-model-decorators';

export default () => {
  class Media {
    static schema = {
      sourceID: { type: String, max: 128, required: true },
      sourceType: { type: String, max: 128, required: true },
      sourceData: {},
      artist: { type: String, max: 128, required: true },
      title: { type: String, max: 128, required: true },
      duration: { type: Number, min: 0, default: 0 },
      thumbnail: { type: String, max: 256, default: '' }
    };
  }

  return createSchema({ minimize: false })(Media);
};
{'fraction_non_alphanumeric': 0.15463917525773196, 'fraction_numerical': 0.02775574940523394, 'mean_word_length': 3.1241830065359477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4893039', 'n_tokens_mistral': 416, 'n_tokens_neox': 381, 'n_words': 128}