diff --git a/aspnetcore/src/DatabaseContext/ApiDbContext.cs b/aspnetcore/src/DatabaseContext/ApiDbContext.cs index 978bc9e..37c8161 100644 --- a/aspnetcore/src/DatabaseContext/ApiDbContext.cs +++ b/aspnetcore/src/DatabaseContext/ApiDbContext.cs @@ -40,6 +40,8 @@ public ApiDbContext(DbContextOptions options) public virtual DbSet DimDates { get; set; } + public virtual DbSet DimDescriptiveItems { get; set; } + public virtual DbSet DimEducations { get; set; } public virtual DbSet DimEmailAddrresses { get; set; } @@ -140,15 +142,19 @@ public ApiDbContext(DbContextOptions options) public virtual DbSet FactFieldValues { get; set; } + public virtual DbSet FactFieldValuesTests { get; set; } + public virtual DbSet FactInfraKeywords { get; set; } + public virtual DbSet FactKeywords { get; set; } + public virtual DbSet FactUpkeeps { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimResearchDatasetId, e.DimResearchDatasetId2 }).HasName("PK__br_datas__9FEA685AB5E2C1AE"); + entity.HasKey(e => new { e.DimResearchDatasetId, e.DimResearchDatasetId2 }).HasName("PK__br_datas__9FEA685A464756D5"); entity.ToTable("br_dataset_dataset_relationship"); @@ -172,7 +178,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimFundingDecisionId, e.DimOrganizationid }).HasName("PK__br_fundi__3DB567F8D8D7C529"); + entity.HasKey(e => new { e.DimFundingDecisionId, e.DimOrganizationid }).HasName("PK__br_fundi__3DB567F8F68FB7BC"); entity.ToTable("br_funding_consortium_participation"); @@ -199,7 +205,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimUserProfileId, e.DimExternalServiceId, e.DimPermittedFieldGroup }).HasName("PK__br_grant__F51F7BCB6382AE3A"); + entity.HasKey(e => new { e.DimUserProfileId, e.DimExternalServiceId, e.DimPermittedFieldGroup }).HasName("PK__br_grant__F51F7BCB3D7E13E6"); entity.ToTable("br_granted_permissions"); @@ -281,7 +287,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimWordClusterId, e.DimFundingDecisionId }).HasName("PK__br_word___7D640B5A67A580FB"); + entity.HasKey(e => new { e.DimWordClusterId, e.DimFundingDecisionId }).HasName("PK__br_word___7D640B5A7DB1BC24"); entity.ToTable("br_word_cluster_dim_funding_decision"); @@ -313,7 +319,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimMinedWordsId, e.DimWordClusterId }).HasName("PK__br_words__0602FA37D4ACC5C8"); + entity.HasKey(e => new { e.DimMinedWordsId, e.DimWordClusterId }).HasName("PK__br_words__0602FA378A3C0AB4"); entity.ToTable("br_words_define_a_cluster"); @@ -345,7 +351,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_affi__3213E83F06A4D1E9"); + entity.HasKey(e => e.Id).HasName("PK__dim_affi__3213E83FD784DC45"); entity.ToTable("dim_affiliation"); @@ -421,7 +427,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_call__3213E83FC03B7861"); + entity.HasKey(e => e.Id).HasName("PK__dim_call__3213E83FD2F9082B"); entity.ToTable("dim_call_decisions", tb => tb.HasComment("Rahoituspäätöspaneeli")); @@ -562,7 +568,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("belongs to / a part of "), j => { - j.HasKey("DimCallProgrammeId", "DimCallProgrammeId2").HasName("PK__br_call___6F0CEDFB2F20C88E"); + j.HasKey("DimCallProgrammeId", "DimCallProgrammeId2").HasName("PK__br_call___6F0CEDFBFB40F243"); j.ToTable("br_call_programme_dim_call_programme"); j.IndexerProperty("DimCallProgrammeId").HasColumnName("dim_call_programme_id"); j.IndexerProperty("DimCallProgrammeId2").HasColumnName("dim_call_programme_id2"); @@ -581,7 +587,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_call_pr785575"), j => { - j.HasKey("DimCallProgrammeId", "DimCallProgrammeId2").HasName("PK__br_call___6F0CEDFB2F20C88E"); + j.HasKey("DimCallProgrammeId", "DimCallProgrammeId2").HasName("PK__br_call___6F0CEDFBFB40F243"); j.ToTable("br_call_programme_dim_call_programme"); j.IndexerProperty("DimCallProgrammeId").HasColumnName("dim_call_programme_id"); j.IndexerProperty("DimCallProgrammeId2").HasColumnName("dim_call_programme_id2"); @@ -600,7 +606,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("has disciplines"), j => { - j.HasKey("DimCallProgrammeId", "DimReferencedataId").HasName("PK__br_dim_r__0A5B885DD5A55F67"); + j.HasKey("DimCallProgrammeId", "DimReferencedataId").HasName("PK__br_dim_r__0A5B885D90EF4632"); j.ToTable("br_dim_referencedata_dim_call_programme"); j.IndexerProperty("DimCallProgrammeId").HasColumnName("dim_call_programme_id"); j.IndexerProperty("DimReferencedataId").HasColumnName("dim_referencedata_id"); @@ -609,7 +615,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_comp__3213E83F8D6B4242"); + entity.HasKey(e => e.Id).HasName("PK__dim_comp__3213E83FCB2CACD8"); entity.ToTable("dim_competence"); @@ -662,7 +668,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_date__3213E83F7FCE2152"); + entity.HasKey(e => e.Id).HasName("PK__dim_date__3213E83FDC72C61E"); entity.ToTable("dim_date"); @@ -684,9 +690,72 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.Year).HasColumnName("year"); }); + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Id).HasName("PK__dim_desc__3213E83F8B3C7317"); + + entity.ToTable("dim_descriptive_item", tb => tb.HasComment("https://iri.suomi.fi/model/researchfi_core_project/\r\nProjektin kuvailutiedot ajassa\r\nhttps://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time")); + + entity.Property(e => e.Id).HasColumnName("id"); + entity.Property(e => e.Created) + .HasColumnType("datetime") + .HasColumnName("created"); + entity.Property(e => e.DescriptiveItem) + .IsUnicode(false) + .HasComment("https://iri.suomi.fi/model/researchfi_core_project/\r\nProjektin kuvailutiedot ajassa\r\nhttps://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time\r\n* kuvailutiedon sisältö") + .HasColumnName("descriptive_item"); + entity.Property(e => e.DescriptiveItemLanguage) + .HasMaxLength(255) + .IsUnicode(false) + .HasComment("fi, en, sv, NULL") + .HasColumnName("descriptive_item_language"); + entity.Property(e => e.DescriptiveItemType) + .HasMaxLength(255) + .HasComment("https://iri.suomi.fi/model/researchfi_core_project/\r\nhttps://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_type\r\n- description\r\n- name\r\n- goal\r\n- outcome_effect\r\n- abberviation") + .HasColumnName("descriptive_item_type"); + entity.Property(e => e.DimEndDate) + .HasComment("https://iri.suomi.fi/model/researchfi_core_project/\r\nProjektin kuvailutiedot ajassa\r\nhttps://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time\r\n* päättymispäivämäärä") + .HasColumnName("dim_end_date"); + entity.Property(e => e.DimRegisteredDataSourceId).HasColumnName("dim_registered_data_source_id"); + entity.Property(e => e.DimResearchProjectId) + .HasComment("https://iri.suomi.fi/model/researchfi_core_project/\r\nProjektin kuvailutiedot ajassa\r\nhttps://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time\r\n- liittyy projektiin") + .HasColumnName("dim_research_project_id"); + entity.Property(e => e.DimStartDate) + .HasComment("https://iri.suomi.fi/model/researchfi_core_project/\r\nProjektin kuvailutiedot ajassa\r\nhttps://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time\r\n* alkamispäivämäärä") + .HasColumnName("dim_start_date"); + entity.Property(e => e.Modified) + .HasColumnType("datetime") + .HasColumnName("modified"); + entity.Property(e => e.SourceDescription) + .HasMaxLength(255) + .HasColumnName("source_description"); + entity.Property(e => e.SourceId) + .HasMaxLength(255) + .HasColumnName("source_id"); + + entity.HasOne(d => d.DimEndDateNavigation).WithMany(p => p.DimDescriptiveItemDimEndDateNavigations) + .HasForeignKey(d => d.DimEndDate) + .HasConstraintName("FKdim_projec840854"); + + entity.HasOne(d => d.DimRegisteredDataSource).WithMany(p => p.DimDescriptiveItems) + .HasForeignKey(d => d.DimRegisteredDataSourceId) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FKdim_projec486279"); + + entity.HasOne(d => d.DimResearchProject).WithMany(p => p.DimDescriptiveItems) + .HasForeignKey(d => d.DimResearchProjectId) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FKdim_projec16367"); + + entity.HasOne(d => d.DimStartDateNavigation).WithMany(p => p.DimDescriptiveItemDimStartDateNavigations) + .HasForeignKey(d => d.DimStartDate) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FKdim_projec650419"); + }); + modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_educ__3213E83FCBB0C37E"); + entity.HasKey(e => e.Id).HasName("PK__dim_educ__3213E83FA308B9AE"); entity.ToTable("dim_education"); @@ -768,7 +837,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_emai__3213E83F1F4B6F39"); + entity.HasKey(e => e.Id).HasName("PK__dim_emai__3213E83F7F40E7EA"); entity.ToTable("dim_email_addrress"); @@ -804,7 +873,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_esfr__3213E83F47FAB298"); + entity.HasKey(e => e.Id).HasName("PK__dim_esfr__3213E83FE3708FE1"); entity.ToTable("dim_esfri"); @@ -847,7 +916,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_esfri_d559740"), j => { - j.HasKey("DimEsfriId", "DimInfrastructureId").HasName("PK__br_esfri__A4A0FE10DD9772D1"); + j.HasKey("DimEsfriId", "DimInfrastructureId").HasName("PK__br_esfri__A4A0FE10D9945662"); j.ToTable("br_esfri_dim_infrastructure"); j.IndexerProperty("DimEsfriId").HasColumnName("dim_esfri_id"); j.IndexerProperty("DimInfrastructureId").HasColumnName("dim_infrastructure_id"); @@ -856,7 +925,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_even__3213E83F0F3DAD87"); + entity.HasKey(e => e.Id).HasName("PK__dim_even__3213E83FB4DB05DE"); entity.ToTable("dim_event"); @@ -913,7 +982,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_exte__3213E83F5C147521"); + entity.HasKey(e => e.Id).HasName("PK__dim_exte__3213E83F4707B6E7"); entity.ToTable("dim_external_service"); @@ -947,7 +1016,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_fiel__3213E83FECCCD9E0"); + entity.HasKey(e => e.Id).HasName("PK__dim_fiel__3213E83F6D2DE502"); entity.ToTable("dim_field_display_settings"); @@ -986,7 +1055,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_field_d783303"), j => { - j.HasKey("DimFieldDisplaySettingsId", "DimRegisteredDataSourceId").HasName("PK__br_field__6148A7726777D902"); + j.HasKey("DimFieldDisplaySettingsId", "DimRegisteredDataSourceId").HasName("PK__br_field__6148A7721A230EB9"); j.ToTable("br_field_display_settings_dim_registered_data_source"); j.IndexerProperty("DimFieldDisplaySettingsId").HasColumnName("dim_field_display_settings_id"); j.IndexerProperty("DimRegisteredDataSourceId").HasColumnName("dim_registered_data_source_id"); @@ -995,7 +1064,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_fund__3213E83F76620647"); + entity.HasKey(e => e.Id).HasName("PK__dim_fund__3213E83F116F6448"); entity.ToTable("dim_funding_decision"); @@ -1121,7 +1190,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_related689923"), j => { - j.HasKey("DimFundingDecisionFromId", "DimFundingDecisionToId").HasName("PK__br_relat__909664918B76C476"); + j.HasKey("DimFundingDecisionFromId", "DimFundingDecisionToId").HasName("PK__br_relat__909664916E7D3FD3"); j.ToTable("br_related_funding_decision"); j.IndexerProperty("DimFundingDecisionFromId").HasColumnName("dim_funding_decision_from_id"); j.IndexerProperty("DimFundingDecisionToId").HasColumnName("dim_funding_decision_to_id"); @@ -1140,7 +1209,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_related232364"), j => { - j.HasKey("DimFundingDecisionFromId", "DimFundingDecisionToId").HasName("PK__br_relat__909664918B76C476"); + j.HasKey("DimFundingDecisionFromId", "DimFundingDecisionToId").HasName("PK__br_relat__909664916E7D3FD3"); j.ToTable("br_related_funding_decision"); j.IndexerProperty("DimFundingDecisionFromId").HasColumnName("dim_funding_decision_from_id"); j.IndexerProperty("DimFundingDecisionToId").HasColumnName("dim_funding_decision_to_id"); @@ -1149,7 +1218,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_geo__3213E83F055E84C8"); + entity.HasKey(e => e.Id).HasName("PK__dim_geo__3213E83FCFA21FA2"); entity.ToTable("dim_geo"); @@ -1203,7 +1272,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_iden__3213E83F0442DAAD"); + entity.HasKey(e => e.Id).HasName("PK__dim_iden__3213E83F4625F11E"); entity.ToTable("dim_identifierless_data"); @@ -1245,7 +1314,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_infr__3213E83F432AB60A"); + entity.HasKey(e => e.Id).HasName("PK__dim_infr__3213E83FDC4BBFCD"); entity.ToTable("dim_infrastructure"); @@ -1319,7 +1388,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_keyw__3213E83F60A9F1D0"); + entity.HasKey(e => e.Id).HasName("PK__dim_keyw__3213E83F24A9C234"); entity.ToTable("dim_keyword"); @@ -1386,7 +1455,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_keyword224605"), j => { - j.HasKey("DimKeywordId", "DimFundingDecisionId").HasName("PK__br_keywo__8C7B929B3190CD77"); + j.HasKey("DimKeywordId", "DimFundingDecisionId").HasName("PK__br_keywo__8C7B929B5130C593"); j.ToTable("br_keyword_dim_funding_decision"); j.IndexerProperty("DimKeywordId").HasColumnName("dim_keyword_id"); j.IndexerProperty("DimFundingDecisionId").HasColumnName("dim_funding_decision_id"); @@ -1405,7 +1474,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_keyword944303"), j => { - j.HasKey("DimKeywordId", "DimPublicationId").HasName("PK__br_keywo__C6E31F1A6C5DC5A4"); + j.HasKey("DimKeywordId", "DimPublicationId").HasName("PK__br_keywo__C6E31F1AB66AFC05"); j.ToTable("br_keyword_dim_publication"); j.IndexerProperty("DimKeywordId").HasColumnName("dim_keyword_id"); j.IndexerProperty("DimPublicationId").HasColumnName("dim_publication_id"); @@ -1414,7 +1483,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_know__3213E83F2F885DFE"); + entity.HasKey(e => e.Id).HasName("PK__dim_know__3213E83FC7D31429"); entity.ToTable("dim_known_person"); @@ -1443,7 +1512,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_loca__3213E83F9860469B"); + entity.HasKey(e => e.Id).HasName("PK__dim_loca__3213E83F13468998"); entity.ToTable("dim_locally_reported_pub_info"); @@ -1491,7 +1560,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_meri__3213E83F43BFB92B"); + entity.HasKey(e => e.Id).HasName("PK__dim_meri__3213E83F77BAA15F"); entity.ToTable("dim_meril"); @@ -1534,7 +1603,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_meril_d209645"), j => { - j.HasKey("DimMerilId", "DimInfrastructureId").HasName("PK__br_meril__A30C54DAC68B4425"); + j.HasKey("DimMerilId", "DimInfrastructureId").HasName("PK__br_meril__A30C54DAF16D4AD0"); j.ToTable("br_meril_dim_infrastructure"); j.IndexerProperty("DimMerilId").HasColumnName("dim_meril_id"); j.IndexerProperty("DimInfrastructureId").HasColumnName("dim_infrastructure_id"); @@ -1543,7 +1612,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_mine__3213E83F11433418"); + entity.HasKey(e => e.Id).HasName("PK__dim_mine__3213E83F66EFE059"); entity.ToTable("dim_mined_words"); @@ -1567,7 +1636,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_name__3213E83F18FD3B49"); + entity.HasKey(e => e.Id).HasName("PK__dim_name__3213E83F7B3C4CF1"); entity.ToTable("dim_name"); @@ -1612,7 +1681,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_news__3213E83FFBBF2D4C"); + entity.HasKey(e => e.Id).HasName("PK__dim_news__3213E83FA75D4601"); entity.ToTable("dim_news_feed"); @@ -1639,7 +1708,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.Id, e.DimNewsFeedid }).HasName("PK__dim_news__B87E6703FEA4C619"); + entity.HasKey(e => new { e.Id, e.DimNewsFeedid }).HasName("PK__dim_news__B87E670377DEA422"); entity.ToTable("dim_news_item"); @@ -1708,7 +1777,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_orga__3213E83FF8B3CB16"); + entity.HasKey(e => e.Id).HasName("PK__dim_orga__3213E83FEAB47B87"); entity.ToTable("dim_organization"); @@ -1804,7 +1873,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_organiz621686"), j => { - j.HasKey("DimOrganizationid", "DimCallProgrammeid").HasName("PK__br_organ__10F219BCF98798D3"); + j.HasKey("DimOrganizationid", "DimCallProgrammeid").HasName("PK__br_organ__10F219BCE3602C5A"); j.ToTable("br_organizations_fund_call_programmes"); j.IndexerProperty("DimOrganizationid").HasColumnName("dim_organizationid"); j.IndexerProperty("DimCallProgrammeid").HasColumnName("dim_call_programmeid"); @@ -1823,7 +1892,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_predece849307"), j => { - j.HasKey("DimOrganizationid", "DimOrganizationid2").HasName("PK__br_prede__A7CAD2F4B01F95BC"); + j.HasKey("DimOrganizationid", "DimOrganizationid2").HasName("PK__br_prede__A7CAD2F405A10D94"); j.ToTable("br_predecessor_organization"); j.IndexerProperty("DimOrganizationid").HasColumnName("dim_organizationid"); j.IndexerProperty("DimOrganizationid2").HasColumnName("dim_organizationid2"); @@ -1842,7 +1911,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_success452227"), j => { - j.HasKey("DimOrganizationid", "DimOrganizationid2").HasName("PK__br_succe__A7CAD2F4E61F8F49"); + j.HasKey("DimOrganizationid", "DimOrganizationid2").HasName("PK__br_succe__A7CAD2F4DAB1AD59"); j.ToTable("br_successor organization"); j.IndexerProperty("DimOrganizationid").HasColumnName("dim_organizationid"); j.IndexerProperty("DimOrganizationid2").HasColumnName("dim_organizationid2"); @@ -1861,7 +1930,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_predece505451"), j => { - j.HasKey("DimOrganizationid", "DimOrganizationid2").HasName("PK__br_prede__A7CAD2F4B01F95BC"); + j.HasKey("DimOrganizationid", "DimOrganizationid2").HasName("PK__br_prede__A7CAD2F405A10D94"); j.ToTable("br_predecessor_organization"); j.IndexerProperty("DimOrganizationid").HasColumnName("dim_organizationid"); j.IndexerProperty("DimOrganizationid2").HasColumnName("dim_organizationid2"); @@ -1880,7 +1949,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_success902531"), j => { - j.HasKey("DimOrganizationid", "DimOrganizationid2").HasName("PK__br_succe__A7CAD2F4E61F8F49"); + j.HasKey("DimOrganizationid", "DimOrganizationid2").HasName("PK__br_succe__A7CAD2F4DAB1AD59"); j.ToTable("br_successor organization"); j.IndexerProperty("DimOrganizationid").HasColumnName("dim_organizationid"); j.IndexerProperty("DimOrganizationid2").HasColumnName("dim_organizationid2"); @@ -1889,7 +1958,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_pid__3213E83F4F654D17"); + entity.HasKey(e => e.Id).HasName("PK__dim_pid__3213E83F1D16147B"); entity.ToTable("dim_pid"); @@ -1998,7 +2067,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_prof__3213E83FC1756098"); + entity.HasKey(e => e.Id).HasName("PK__dim_prof__3213E83F911670C0"); entity.ToTable("dim_profile_only_dataset"); @@ -2058,7 +2127,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_prof__3213E83F823F3A22"); + entity.HasKey(e => e.Id).HasName("PK__dim_prof__3213E83F8A2EE74A"); entity.ToTable("dim_profile_only_funding_decision"); @@ -2154,7 +2223,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_prof__3213E83FADFF689E"); + entity.HasKey(e => e.Id).HasName("PK__dim_prof__3213E83FA661F4EE"); entity.ToTable("dim_profile_only_publication"); @@ -2305,7 +2374,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_prof__3213E83F6C9F0350"); + entity.HasKey(e => e.Id).HasName("PK__dim_prof__3213E83FE053C8B7"); entity.ToTable("dim_profile_only_research_activity"); @@ -2385,7 +2454,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_publ__3213E83F11E193C7"); + entity.HasKey(e => e.Id).HasName("PK__dim_publ__3213E83FE30BF713"); entity.ToTable("dim_publication"); @@ -2598,7 +2667,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_artpubl464312"), j => { - j.HasKey("DimPublicationId", "DimReferencedataid").HasName("PK__br_artpu__879F18F344EC60D6"); + j.HasKey("DimPublicationId", "DimReferencedataid").HasName("PK__br_artpu__879F18F350061417"); j.ToTable("br_artpublication_typecategory"); j.IndexerProperty("DimPublicationId").HasColumnName("dim_publication_id"); j.IndexerProperty("DimReferencedataid").HasColumnName("dim_referencedataid"); @@ -2607,7 +2676,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_publ__3213E83F5AC8404B"); + entity.HasKey(e => e.Id).HasName("PK__dim_publ__3213E83FA2E9BA3B"); entity.ToTable("dim_publication_channel"); @@ -2637,7 +2706,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_purp__3213E83FA746F35A"); + entity.HasKey(e => e.Id).HasName("PK__dim_purp__3213E83FB4F4F7FB"); entity.ToTable("dim_purpose"); @@ -2679,7 +2748,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_refe__3213E83F01FC17FA"); + entity.HasKey(e => e.Id).HasName("PK__dim_refe__3213E83F69CC08EC"); entity.ToTable("dim_referencedata"); @@ -2737,7 +2806,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKfact_dim_r130466"), j => { - j.HasKey("DimReferencedataId", "DimPublicationId").HasName("PK__fact_dim__62A1BBCB38ED3F08"); + j.HasKey("DimReferencedataId", "DimPublicationId").HasName("PK__fact_dim__62A1BBCB69D8E9CC"); j.ToTable("fact_dim_referencedata_field_of_art"); j.IndexerProperty("DimReferencedataId").HasColumnName("dim_referencedata_id"); j.IndexerProperty("DimPublicationId").HasColumnName("dim_publication_id"); @@ -2746,7 +2815,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_regi__3213E83F64F6AB47"); + entity.HasKey(e => e.Id).HasName("PK__dim_regi__3213E83FB81C5F68"); entity.ToTable("dim_registered_data_source"); @@ -2776,7 +2845,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83FC9D359FC"); + entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F17756666"); entity.ToTable("dim_research_activity"); @@ -2859,7 +2928,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimResearchActivityId, e.DimKeywordId }).HasName("PK__dim_rese__F7B536BCA2B5BA4E"); + entity.HasKey(e => new { e.DimResearchActivityId, e.DimKeywordId }).HasName("PK__dim_rese__F7B536BC341143EF"); entity.ToTable("dim_research_activity_dim_keyword"); @@ -2874,7 +2943,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F0398A530"); + entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F9E966DBF"); entity.ToTable("dim_research_community"); @@ -2920,7 +2989,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F8F43447A"); + entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83FC6AC2055"); entity.ToTable("dim_research_data_catalog"); @@ -2959,7 +3028,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83FFF02318D"); + entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F91D1936E"); entity.ToTable("dim_research_dataset"); @@ -3049,7 +3118,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("dataset-keywords"), j => { - j.HasKey("DimResearchDatasetId", "DimKeywordId").HasName("PK__br_resea__4D226DF23AE90BD5"); + j.HasKey("DimResearchDatasetId", "DimKeywordId").HasName("PK__br_resea__4D226DF205B0C821"); j.ToTable("br_research_dataset_dim_keyword"); j.IndexerProperty("DimResearchDatasetId").HasColumnName("dim_research_dataset_id"); j.IndexerProperty("DimKeywordId").HasColumnName("dim_keyword_id"); @@ -3068,7 +3137,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKbr_languag34243"), j => { - j.HasKey("DimResearchDatasetId", "DimReferencedataId").HasName("PK__br_langu__576647BFE99BAEAA"); + j.HasKey("DimResearchDatasetId", "DimReferencedataId").HasName("PK__br_langu__576647BF516D34CB"); j.ToTable("br_language_codes_for_datasets"); j.IndexerProperty("DimResearchDatasetId").HasColumnName("dim_research_dataset_id"); j.IndexerProperty("DimReferencedataId").HasColumnName("dim_referencedata_id"); @@ -3077,52 +3146,21 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F18FD8710"); + entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F916C260E"); entity.ToTable("dim_research_project"); entity.Property(e => e.Id).HasColumnName("id"); - entity.Property(e => e.AbbrevationEn) - .HasMaxLength(4000) - .HasColumnName("abbrevation_en"); - entity.Property(e => e.AbbrevationFi) - .HasMaxLength(4000) - .HasComment("Hanke - lyhenne") - .HasColumnName("abbrevation_fi"); - entity.Property(e => e.AbbrevationSv) - .HasMaxLength(4000) - .HasColumnName("abbrevation_sv"); entity.Property(e => e.Created) .HasColumnType("datetime") .HasColumnName("created"); - entity.Property(e => e.DescriptionEn).HasColumnName("description_en"); - entity.Property(e => e.DescriptionFi) - .HasComment("Hanke - tiivistelmä") - .HasColumnName("description_fi"); - entity.Property(e => e.DescriptionSv).HasColumnName("description_sv"); entity.Property(e => e.DimRegisteredDataSourceId).HasColumnName("dim_registered_data_source_id"); entity.Property(e => e.EndDate) .HasComment("Hanke - päättymispäivämäärä") .HasColumnName("end_date"); - entity.Property(e => e.GoalsEn).HasColumnName("goals_en"); - entity.Property(e => e.GoalsFi).HasColumnName("goals_fi"); - entity.Property(e => e.GoalsSv).HasColumnName("goals_sv"); entity.Property(e => e.Modified) .HasColumnType("datetime") .HasColumnName("modified"); - entity.Property(e => e.NameEn) - .HasMaxLength(4000) - .HasColumnName("name_en"); - entity.Property(e => e.NameFi) - .HasMaxLength(4000) - .HasComment("Hanke - nimi") - .HasColumnName("name_fi"); - entity.Property(e => e.NameSv) - .HasMaxLength(4000) - .HasColumnName("name_sv"); - entity.Property(e => e.OutcomeEffectEn).HasColumnName("outcome_effect_en"); - entity.Property(e => e.OutcomeEffectFi).HasColumnName("outcome_effect_fi"); - entity.Property(e => e.OutcomeEffectSv).HasColumnName("outcome_effect_sv"); entity.Property(e => e.ResponsibleOrganization) .HasComment("Hanke - vastuuorganisaatio") .HasColumnName("responsible_organization"); @@ -3153,6 +3191,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.HasOne(d => d.ResponsiblePersonNavigation).WithMany(p => p.DimResearchProjects) .HasForeignKey(d => d.ResponsiblePerson) + .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FKdim_resear684392"); entity.HasOne(d => d.StartDateNavigation).WithMany(p => p.DimResearchProjectStartDateNavigations) @@ -3162,7 +3201,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83FC3E877FE"); + entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F112F961D"); entity.ToTable("dim_researcher_description"); @@ -3199,7 +3238,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F0865663F"); + entity.HasKey(e => e.Id).HasName("PK__dim_rese__3213E83F381DFC16"); entity.ToTable("dim_researcher_to_research_community"); @@ -3258,7 +3297,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_sect__3213E83FD2395792"); + entity.HasKey(e => e.Id).HasName("PK__dim_sect__3213E83FCF689C81"); entity.ToTable("dim_sector"); @@ -3291,7 +3330,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_serv__3213E83FB36A1DE2"); + entity.HasKey(e => e.Id).HasName("PK__dim_serv__3213E83FB210C4C4"); entity.ToTable("dim_service"); @@ -3353,7 +3392,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_serv__3213E83FFD80CF07"); + entity.HasKey(e => e.Id).HasName("PK__dim_serv__3213E83FA1F2EBFA"); entity.ToTable("dim_service_point"); @@ -3430,7 +3469,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_tele__3213E83FD7142528"); + entity.HasKey(e => e.Id).HasName("PK__dim_tele__3213E83FA19EB321"); entity.ToTable("dim_telephone_number"); @@ -3466,11 +3505,11 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_type__3213E83F9157129F"); + entity.HasKey(e => e.Id).HasName("PK__dim_type__3213E83FA17A1AFC"); entity.ToTable("dim_type_of_funding"); - entity.HasIndex(e => e.TypeId, "UQ__dim_type__2C000599A0FEB9ED").IsUnique(); + entity.HasIndex(e => e.TypeId, "UQ__dim_type__2C00059957866DEA").IsUnique(); entity.Property(e => e.Id).HasColumnName("id"); entity.Property(e => e.Created) @@ -3507,7 +3546,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_user__3213E83F25B5D78A"); + entity.HasKey(e => e.Id).HasName("PK__dim_user__3213E83F58B7E98D"); entity.ToTable("dim_user_choices"); @@ -3541,7 +3580,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_user__3213E83FE7143FF9"); + entity.HasKey(e => e.Id).HasName("PK__dim_user__3213E83F0F73516C"); entity.ToTable("dim_user_profile"); @@ -3681,7 +3720,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => e.Id).HasName("PK__dim_word__3213E83F52D7957F"); + entity.HasKey(e => e.Id).HasName("PK__dim_word__3213E83FBD661392"); entity.ToTable("dim_word_cluster"); @@ -3704,7 +3743,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimFundingDecisionId, e.DimOrganizationId, e.DimDateId, e.DimNameId, e.DimPublicationId, e.DimGeoId, e.DimInfrastructureId, e.DimNewsFeedId, e.DimResearchDatasetId, e.DimResearchDataCatalogId, e.DimIdentifierlessDataId, e.DimResearchActivityId, e.DimResearchCommunityId, e.DimReferencedataActorRoleId, e.DimResearchProjectId }).HasName("PK__fact_con__7D4857056EF5A938"); + entity.HasKey(e => new { e.DimFundingDecisionId, e.DimOrganizationId, e.DimDateId, e.DimNameId, e.DimPublicationId, e.DimGeoId, e.DimInfrastructureId, e.DimNewsFeedId, e.DimResearchDatasetId, e.DimResearchDataCatalogId, e.DimIdentifierlessDataId, e.DimResearchActivityId, e.DimResearchCommunityId, e.DimReferencedataActorRoleId, e.DimResearchProjectId }).HasName("PK__fact_con__7D4857053B6110A6"); entity.ToTable("fact_contribution"); @@ -3814,7 +3853,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimReferencedataId, e.DimResearchDatasetId, e.DimKnownPersonId, e.DimPublicationId, e.DimResearchActivityId, e.DimFundingDecisionId, e.DimInfrastructureId }).HasName("PK__fact_dim__3CB15DD34F793838"); + entity.HasKey(e => new { e.DimReferencedataId, e.DimResearchDatasetId, e.DimKnownPersonId, e.DimPublicationId, e.DimResearchActivityId, e.DimFundingDecisionId, e.DimInfrastructureId }).HasName("PK__fact_dim__3CB15DD376635B68"); entity.ToTable("fact_dim_referencedata_field_of_science"); @@ -4047,9 +4086,59 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKfact_field475402"); }); + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("fact_field_values_test"); + + entity.Property(e => e.Created) + .HasColumnType("datetime") + .HasColumnName("created"); + entity.Property(e => e.DimAffiliationId).HasColumnName("dim_affiliation_id"); + entity.Property(e => e.DimCompetenceId).HasColumnName("dim_competence_id"); + entity.Property(e => e.DimEducationId).HasColumnName("dim_education_id"); + entity.Property(e => e.DimEmailAddrressId).HasColumnName("dim_email_addrress_id"); + entity.Property(e => e.DimEventId).HasColumnName("dim_event_id"); + entity.Property(e => e.DimFieldDisplaySettingsId).HasColumnName("dim_field_display_settings_id"); + entity.Property(e => e.DimFundingDecisionId).HasColumnName("dim_funding_decision_id"); + entity.Property(e => e.DimIdentifierlessDataId).HasColumnName("dim_identifierless_data_id"); + entity.Property(e => e.DimKeywordId).HasColumnName("dim_keyword_id"); + entity.Property(e => e.DimNameId).HasColumnName("dim_name_id"); + entity.Property(e => e.DimPidId).HasColumnName("dim_pid_id"); + entity.Property(e => e.DimPidIdOrcidPutCode).HasColumnName("dim_pid_id_orcid_put_code"); + entity.Property(e => e.DimProfileOnlyDatasetId).HasColumnName("dim_profile_only_dataset_id"); + entity.Property(e => e.DimProfileOnlyFundingDecisionId).HasColumnName("dim_profile_only_funding_decision_id"); + entity.Property(e => e.DimProfileOnlyPublicationId).HasColumnName("dim_profile_only_publication_id"); + entity.Property(e => e.DimProfileOnlyResearchActivityId).HasColumnName("dim_profile_only_research_activity_id"); + entity.Property(e => e.DimPublicationId).HasColumnName("dim_publication_id"); + entity.Property(e => e.DimReferencedataActorRoleId).HasColumnName("dim_referencedata_actor_role_id"); + entity.Property(e => e.DimReferencedataFieldOfScienceId).HasColumnName("dim_referencedata_field_of_science_id"); + entity.Property(e => e.DimRegisteredDataSourceId).HasColumnName("dim_registered_data_source_id"); + entity.Property(e => e.DimResearchActivityId).HasColumnName("dim_research_activity_id"); + entity.Property(e => e.DimResearchCommunityId).HasColumnName("dim_research_community_id"); + entity.Property(e => e.DimResearchDatasetId).HasColumnName("dim_research_dataset_id"); + entity.Property(e => e.DimResearcherDescriptionId).HasColumnName("dim_researcher_description_id"); + entity.Property(e => e.DimResearcherToResearchCommunityId).HasColumnName("dim_researcher_to_research_community_id"); + entity.Property(e => e.DimTelephoneNumberId).HasColumnName("dim_telephone_number_id"); + entity.Property(e => e.DimUserProfileId).HasColumnName("dim_user_profile_id"); + entity.Property(e => e.DimWebLinkId).HasColumnName("dim_web_link_id"); + entity.Property(e => e.Modified) + .HasColumnType("datetime") + .HasColumnName("modified"); + entity.Property(e => e.PrimaryValue).HasColumnName("primary_value"); + entity.Property(e => e.Show).HasColumnName("show"); + entity.Property(e => e.SourceDescription) + .HasMaxLength(255) + .HasColumnName("source_description"); + entity.Property(e => e.SourceId) + .HasMaxLength(255) + .HasColumnName("source_id"); + }); + modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimKeywordId, e.DimServiceId, e.DimServicePointId, e.DimInfrastructureId }).HasName("PK__fact_inf__3C29B6806599E9CD"); + entity.HasKey(e => new { e.DimKeywordId, e.DimServiceId, e.DimServicePointId, e.DimInfrastructureId }).HasName("PK__fact_inf__3C29B68007C6F679"); entity.ToTable("fact_infra_keywords"); @@ -4091,9 +4180,35 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasConstraintName("FKfact_infra619117"); }); + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.DimKeywordId, e.DimResearchProjectId }).HasName("PK__fact_key__3711EA3DA91C3371"); + + entity.ToTable("fact_keywords"); + + entity.Property(e => e.DimKeywordId) + .HasDefaultValueSql("('-1')") + .HasColumnName("dim_keyword_id"); + entity.Property(e => e.DimResearchProjectId) + .HasDefaultValueSql("('-1')") + .HasColumnName("dim_research_project_id"); + entity.Property(e => e.Created) + .HasColumnType("datetime") + .HasColumnName("created"); + entity.Property(e => e.Modified) + .HasColumnType("datetime") + .HasColumnName("modified"); + entity.Property(e => e.SourceDescription) + .HasMaxLength(255) + .HasColumnName("source_description"); + entity.Property(e => e.SourceId) + .HasMaxLength(255) + .HasColumnName("source_id"); + }); + modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.DimOrganizationId, e.DimGeoId, e.DimInfrastructureId, e.DimServiceId, e.DimServicePointId, e.DimDateIdStart, e.DimDateIdEnd }).HasName("PK__fact_upk__850A8E300E64352E"); + entity.HasKey(e => new { e.DimOrganizationId, e.DimGeoId, e.DimInfrastructureId, e.DimServiceId, e.DimServicePointId, e.DimDateIdStart, e.DimDateIdEnd }).HasName("PK__fact_upk__850A8E30C9FC9F36"); entity.ToTable("fact_upkeep"); diff --git a/aspnetcore/src/DatabaseContext/Entities/BrParticipatesInFundingGroup.cs b/aspnetcore/src/DatabaseContext/Entities/BrParticipatesInFundingGroup.cs index a52ec13..e91c058 100644 --- a/aspnetcore/src/DatabaseContext/Entities/BrParticipatesInFundingGroup.cs +++ b/aspnetcore/src/DatabaseContext/Entities/BrParticipatesInFundingGroup.cs @@ -7,7 +7,7 @@ public partial class BrParticipatesInFundingGroup { public int DimFundingDecisionid { get; set; } - public int DimNameId { get; set; } + public long DimNameId { get; set; } public int DimOrganizationId { get; set; } diff --git a/aspnetcore/src/DatabaseContext/Entities/DimDate.cs b/aspnetcore/src/DatabaseContext/Entities/DimDate.cs index a460a39..63abc50 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimDate.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimDate.cs @@ -31,6 +31,10 @@ public partial class DimDate public virtual ICollection DimCallProgrammeDimDateIdOpenNavigations { get; set; } = new List(); + public virtual ICollection DimDescriptiveItemDimEndDateNavigations { get; set; } = new List(); + + public virtual ICollection DimDescriptiveItemDimStartDateNavigations { get; set; } = new List(); + public virtual ICollection DimEducationDimEndDateNavigations { get; set; } = new List(); public virtual ICollection DimEducationDimStartDateNavigations { get; set; } = new List(); diff --git a/aspnetcore/src/DatabaseContext/Entities/DimDescriptiveItem.cs b/aspnetcore/src/DatabaseContext/Entities/DimDescriptiveItem.cs new file mode 100644 index 0000000..0c31560 --- /dev/null +++ b/aspnetcore/src/DatabaseContext/Entities/DimDescriptiveItem.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; + +namespace CSC.PublicApi.DatabaseContext.Entities; + +/// +/// https://iri.suomi.fi/model/researchfi_core_project/ +/// Projektin kuvailutiedot ajassa +/// https://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time +/// +public partial class DimDescriptiveItem +{ + public int Id { get; set; } + + /// + /// https://iri.suomi.fi/model/researchfi_core_project/ + /// Projektin kuvailutiedot ajassa + /// https://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time + /// - liittyy projektiin + /// + public int DimResearchProjectId { get; set; } + + /// + /// https://iri.suomi.fi/model/researchfi_core_project/ + /// Projektin kuvailutiedot ajassa + /// https://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time + /// * alkamispäivämäärä + /// + public int DimStartDate { get; set; } + + /// + /// https://iri.suomi.fi/model/researchfi_core_project/ + /// Projektin kuvailutiedot ajassa + /// https://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time + /// * päättymispäivämäärä + /// + public int? DimEndDate { get; set; } + + /// + /// https://iri.suomi.fi/model/researchfi_core_project/ + /// Projektin kuvailutiedot ajassa + /// https://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_in_time + /// * kuvailutiedon sisältö + /// + public string? DescriptiveItem { get; set; } + + /// + /// https://iri.suomi.fi/model/researchfi_core_project/ + /// https://iri.suomi.fi/model/researchfi_core_project/cl_project_descriptive_type + /// - description + /// - name + /// - goal + /// - outcome_effect + /// - abberviation + /// + public string DescriptiveItemType { get; set; } = null!; + + /// + /// fi, en, sv, NULL + /// + public string? DescriptiveItemLanguage { get; set; } + + public string SourceId { get; set; } = null!; + + public string? SourceDescription { get; set; } + + public DateTime? Created { get; set; } + + public DateTime? Modified { get; set; } + + public int DimRegisteredDataSourceId { get; set; } + + public virtual DimDate? DimEndDateNavigation { get; set; } + + public virtual DimRegisteredDataSource DimRegisteredDataSource { get; set; } = null!; + + public virtual DimResearchProject DimResearchProject { get; set; } = null!; + + public virtual DimDate DimStartDateNavigation { get; set; } = null!; +} diff --git a/aspnetcore/src/DatabaseContext/Entities/DimFundingDecision.cs b/aspnetcore/src/DatabaseContext/Entities/DimFundingDecision.cs index 6dc08fc..443ce2e 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimFundingDecision.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimFundingDecision.cs @@ -13,7 +13,7 @@ public partial class DimFundingDecision public int DimDateIdEnd { get; set; } - public int DimNameIdContactPerson { get; set; } + public long DimNameIdContactPerson { get; set; } public int DimCallProgrammeId { get; set; } diff --git a/aspnetcore/src/DatabaseContext/Entities/DimName.cs b/aspnetcore/src/DatabaseContext/Entities/DimName.cs index 16c88af..83655b2 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimName.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimName.cs @@ -5,7 +5,7 @@ namespace CSC.PublicApi.DatabaseContext.Entities; public partial class DimName { - public int Id { get; set; } + public long Id { get; set; } public string? LastName { get; set; } diff --git a/aspnetcore/src/DatabaseContext/Entities/DimRegisteredDataSource.cs b/aspnetcore/src/DatabaseContext/Entities/DimRegisteredDataSource.cs index bf34048..e468c9b 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimRegisteredDataSource.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimRegisteredDataSource.cs @@ -25,6 +25,8 @@ public partial class DimRegisteredDataSource public virtual ICollection DimCompetences { get; set; } = new List(); + public virtual ICollection DimDescriptiveItems { get; set; } = new List(); + public virtual ICollection DimEducations { get; set; } = new List(); public virtual ICollection DimEmailAddrresses { get; set; } = new List(); diff --git a/aspnetcore/src/DatabaseContext/Entities/DimResearchProject.cs b/aspnetcore/src/DatabaseContext/Entities/DimResearchProject.cs index 1933eb9..b782c7a 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimResearchProject.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimResearchProject.cs @@ -12,33 +12,6 @@ public partial class DimResearchProject /// public int ResponsibleOrganization { get; set; } - /// - /// Hanke - nimi - /// - public string? NameFi { get; set; } - - public string? NameEn { get; set; } - - public string? NameSv { get; set; } - - /// - /// Hanke - lyhenne - /// - public string? AbbrevationFi { get; set; } - - public string? AbbrevationEn { get; set; } - - public string? AbbrevationSv { get; set; } - - /// - /// Hanke - tiivistelmä - /// - public string? DescriptionFi { get; set; } - - public string? DescriptionEn { get; set; } - - public string? DescriptionSv { get; set; } - /// /// Hanke - alkamispäivämäärä /// @@ -59,19 +32,9 @@ public partial class DimResearchProject public int DimRegisteredDataSourceId { get; set; } - public int? ResponsiblePerson { get; set; } - - public string? GoalsFi { get; set; } - - public string? GoalsEn { get; set; } - - public string? GoalsSv { get; set; } - - public string? OutcomeEffectFi { get; set; } - - public string? OutcomeEffectEn { get; set; } + public long ResponsiblePerson { get; set; } - public string? OutcomeEffectSv { get; set; } + public virtual ICollection DimDescriptiveItems { get; set; } = new List(); public virtual DimRegisteredDataSource DimRegisteredDataSource { get; set; } = null!; @@ -79,7 +42,7 @@ public partial class DimResearchProject public virtual DimOrganization ResponsibleOrganizationNavigation { get; set; } = null!; - public virtual DimName? ResponsiblePersonNavigation { get; set; } + public virtual DimName ResponsiblePersonNavigation { get; set; } = null!; public virtual DimDate? StartDateNavigation { get; set; } } diff --git a/aspnetcore/src/DatabaseContext/Entities/FactContribution.cs b/aspnetcore/src/DatabaseContext/Entities/FactContribution.cs index 1316d87..c807d32 100644 --- a/aspnetcore/src/DatabaseContext/Entities/FactContribution.cs +++ b/aspnetcore/src/DatabaseContext/Entities/FactContribution.cs @@ -11,7 +11,7 @@ public partial class FactContribution public int DimDateId { get; set; } - public int DimNameId { get; set; } + public long DimNameId { get; set; } public int DimPublicationId { get; set; } diff --git a/aspnetcore/src/DatabaseContext/Entities/FactFieldValue.cs b/aspnetcore/src/DatabaseContext/Entities/FactFieldValue.cs index 469afa7..1006493 100644 --- a/aspnetcore/src/DatabaseContext/Entities/FactFieldValue.cs +++ b/aspnetcore/src/DatabaseContext/Entities/FactFieldValue.cs @@ -9,7 +9,7 @@ public partial class FactFieldValue public int DimFieldDisplaySettingsId { get; set; } - public int DimNameId { get; set; } + public long DimNameId { get; set; } public int DimWebLinkId { get; set; } diff --git a/aspnetcore/src/DatabaseContext/Entities/FactFieldValuesTest.cs b/aspnetcore/src/DatabaseContext/Entities/FactFieldValuesTest.cs new file mode 100644 index 0000000..3722916 --- /dev/null +++ b/aspnetcore/src/DatabaseContext/Entities/FactFieldValuesTest.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; + +namespace CSC.PublicApi.DatabaseContext.Entities; + +public partial class FactFieldValuesTest +{ + public int DimUserProfileId { get; set; } + + public int DimFieldDisplaySettingsId { get; set; } + + public long DimNameId { get; set; } + + public int DimWebLinkId { get; set; } + + public int DimFundingDecisionId { get; set; } + + public int DimPublicationId { get; set; } + + public int DimPidId { get; set; } + + public int DimPidIdOrcidPutCode { get; set; } + + public int DimResearchActivityId { get; set; } + + public int DimEventId { get; set; } + + public int DimEducationId { get; set; } + + public int DimCompetenceId { get; set; } + + public int DimResearchCommunityId { get; set; } + + public int DimTelephoneNumberId { get; set; } + + public int DimEmailAddrressId { get; set; } + + public int DimResearcherDescriptionId { get; set; } + + public int DimIdentifierlessDataId { get; set; } + + public int DimProfileOnlyPublicationId { get; set; } + + public int DimKeywordId { get; set; } + + public int DimAffiliationId { get; set; } + + public int DimResearcherToResearchCommunityId { get; set; } + + public bool? Show { get; set; } + + public bool? PrimaryValue { get; set; } + + public string SourceId { get; set; } = null!; + + public string? SourceDescription { get; set; } + + public DateTime? Created { get; set; } + + public DateTime? Modified { get; set; } + + public int DimResearchDatasetId { get; set; } + + public int DimRegisteredDataSourceId { get; set; } + + public int DimReferencedataFieldOfScienceId { get; set; } + + public int DimProfileOnlyResearchActivityId { get; set; } + + public int DimReferencedataActorRoleId { get; set; } + + public int DimProfileOnlyDatasetId { get; set; } + + public int DimProfileOnlyFundingDecisionId { get; set; } +} diff --git a/aspnetcore/src/DatabaseContext/Entities/FactKeyword.cs b/aspnetcore/src/DatabaseContext/Entities/FactKeyword.cs new file mode 100644 index 0000000..60949fb --- /dev/null +++ b/aspnetcore/src/DatabaseContext/Entities/FactKeyword.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace CSC.PublicApi.DatabaseContext.Entities; + +public partial class FactKeyword +{ + public int DimKeywordId { get; set; } + + public int DimResearchProjectId { get; set; } + + public string SourceId { get; set; } = null!; + + public string SourceDescription { get; set; } = null!; + + public DateTime? Created { get; set; } + + public DateTime? Modified { get; set; } +} diff --git a/aspnetcore/src/Service.Models/Publication/Name.cs b/aspnetcore/src/Service.Models/Publication/Name.cs index 9057a47..133aeb1 100644 --- a/aspnetcore/src/Service.Models/Publication/Name.cs +++ b/aspnetcore/src/Service.Models/Publication/Name.cs @@ -2,7 +2,7 @@ public class Name { - public int NameId { get; set; } + public long NameId { get; set; } public string? FirstNames { get; set; }