Skip to content

Commit

Permalink
Cwdoe 1326 json import export (#97)
Browse files Browse the repository at this point in the history
* added cascadeDelete to Teams table
* eliminate json object cycle errors
* upload uses copy
  • Loading branch information
sei-tspencer committed Apr 17, 2024
1 parent 1cb0c69 commit c07f1d0
Show file tree
Hide file tree
Showing 8 changed files with 1,839 additions and 77 deletions.
7 changes: 5 additions & 2 deletions Blueprint.Api.Data/Models/Team.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class TeamEntity : BaseEntity
public Guid Id { get; set; }
public string Name { get; set; }
public string ShortName { get; set; }
public Guid? MselId { get; set; }
public Guid MselId { get; set; }
public virtual MselEntity Msel { get; set; }
public Guid? CiteTeamTypeId { get; set; }
public string Email { get; set; }
Expand All @@ -28,7 +28,6 @@ public class TeamEntity : BaseEntity
public virtual ICollection<CardTeamEntity> CardTeams { get; set; } = new HashSet<CardTeamEntity>();
public virtual ICollection<PlayerApplicationTeamEntity> PlayerApplicationTeams { get; set; } = new HashSet<PlayerApplicationTeamEntity>();
public virtual ICollection<InvitationEntity> Invitations { get; set; } = new HashSet<InvitationEntity>();
public Guid? OldTeamId { get; set; }
public virtual ICollection<UserTeamRoleEntity> UserTeamRoles { get; set; } = new HashSet<UserTeamRoleEntity>();
public virtual ICollection<CiteActionEntity> CiteActions { get; set; } = new HashSet<CiteActionEntity>();
public virtual ICollection<CiteRoleEntity> CiteRoles { get; set; } = new HashSet<CiteRoleEntity>();
Expand All @@ -39,6 +38,10 @@ public class TeamConfiguration : IEntityTypeConfiguration<TeamEntity>
public void Configure(EntityTypeBuilder<TeamEntity> builder)
{
builder.HasIndex(e => e.Id).IsUnique();
builder
.HasOne(d => d.Msel)
.WithMany(d => d.Teams)
.OnDelete(DeleteBehavior.Cascade);
}
}
}

0 comments on commit c07f1d0

Please sign in to comment.