Skip to content

Commit

Permalink
TTV model update (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkikos committed May 20, 2024
1 parent f6e1727 commit 134ca10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion aspnetcore/src/api/Models/Ttv/DimPid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public partial class DimPid
public int DimPublicationChannelId { get; set; }

public int DimResearchDatasetId { get; set; }

public int DimResearchDataCatalogId { get; set; }

public int DimResearchActivityId { get; set; }
Expand Down
8 changes: 8 additions & 0 deletions aspnetcore/src/api/Models/Ttv/TtvContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasForeignKey(d => d.DimCallDecisionsId)
.HasConstraintName("FKdim_fundin257658");

entity.HasOne(d => d.DimCallDecisions).WithMany(p => p.DimFundingDecisions)
.HasForeignKey(d => d.DimCallDecisionsId)
.HasConstraintName("FKdim_fundin257658");

entity.HasOne(d => d.DimCallProgramme).WithMany(p => p.DimFundingDecisions)
.HasForeignKey(d => d.DimCallProgrammeId)
.OnDelete(DeleteBehavior.ClientSetNull)
Expand Down Expand Up @@ -2015,6 +2019,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasForeignKey(d => d.DimResearchCommunityId)
.HasConstraintName("FKdim_pid146045");

entity.HasOne(d => d.DimResearchCommunity).WithMany(p => p.DimPids)
.HasForeignKey(d => d.DimResearchCommunityId)
.HasConstraintName("FKdim_pid146045");

entity.HasOne(d => d.DimResearchDataCatalog).WithMany(p => p.DimPids)
.HasForeignKey(d => d.DimResearchDataCatalogId)
.OnDelete(DeleteBehavior.ClientSetNull)
Expand Down

0 comments on commit 134ca10

Please sign in to comment.