<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;

using NuClear.AdvancedSearch.Replication.CustomerIntelligence.Model;

namespace NuClear.AdvancedSearch.Replication.CustomerIntelligence.Transforming
{
    public sealed partial class CustomerIntelligenceTransformation
    {
        private static readonly Dictionary<Type, AggregateInfo> Aggregates
            = new AggregateInfo[]
              {
                  AggregateInfo.OfType<Firm>()
                               .HasSource(context => context.Firms)
                               .HasValueObject(context => context.FirmBalances, x => x.FirmId)
                               .HasValueObject(context => context.FirmCategoriesPartFirm, x => x.FirmId)
                               .HasValueObject(context => context.FirmCategoriesPartProject, x => x.FirmId),

                  AggregateInfo.OfType<Client>()
                               .HasSource(context => context.Clients)
                               .HasEntity(context => context.Contacts, x => x.ClientId),

                  AggregateInfo.OfType<Project>()
                               .HasSource(context => context.Projects)
                               .HasValueObject(context => context.ProjectCategories, x => x.ProjectId),

                  AggregateInfo.OfType<Territory>()
                               .HasSource(context => context.Territories),

                  AggregateInfo.OfType<CategoryGroup>()
                               .HasSource(context => context.CategoryGroups),

              }.ToDictionary(x => x.AggregateType);
    }
}<commit_msg>Убрал из агрегата фирмы статистику по проекту<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;

using NuClear.AdvancedSearch.Replication.CustomerIntelligence.Model;

namespace NuClear.AdvancedSearch.Replication.CustomerIntelligence.Transforming
{
    public sealed partial class CustomerIntelligenceTransformation
    {
        private static readonly Dictionary<Type, AggregateInfo> Aggregates
            = new AggregateInfo[]
              {
                  AggregateInfo.OfType<Firm>()
                               .HasSource(context => context.Firms)
                               .HasValueObject(context => context.FirmBalances, x => x.FirmId)
                               .HasValueObject(context => context.FirmCategoriesPartFirm, x => x.FirmId),

                  AggregateInfo.OfType<Client>()
                               .HasSource(context => context.Clients)
                               .HasEntity(context => context.Contacts, x => x.ClientId),

                  AggregateInfo.OfType<Project>()
                               .HasSource(context => context.Projects)
                               .HasValueObject(context => context.ProjectCategories, x => x.ProjectId),

                  AggregateInfo.OfType<Territory>()
                               .HasSource(context => context.Territories),

                  AggregateInfo.OfType<CategoryGroup>()
                               .HasSource(context => context.CategoryGroups),

              }.ToDictionary(x => x.AggregateType);
    }
}
{'fraction_non_alphanumeric': 0.08999370673379484, 'fraction_numerical': 0.0, 'mean_word_length': 1.7667536988685815, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 45, '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': '4632126', 'n_tokens_mistral': 789, 'n_tokens_neox': 761, 'n_words': 122}