Skip to content

Commit

Permalink
Code quality tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunn committed Jun 11, 2024
1 parent efe464d commit 634ae02
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public class OrgGqlConfiguration : ObjectType<Organization>
{
protected override void Configure(IObjectTypeDescriptor<Organization> descriptor)
{
descriptor.Field(p => p.CreatedDate).IsProjected();
descriptor.Field(o => o.CreatedDate).IsProjected();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class OrgProjectsGqlConfiguration : ObjectType<OrgProjects>
{
protected override void Configure(IObjectTypeDescriptor<OrgProjects> descriptor)
{
descriptor.Field(f => f.Org).Type<NonNullType<OrgGqlConfiguration>>();
descriptor.Field(f => f.Project).Type<NonNullType<ProjectGqlConfiguration>>();
descriptor.Field(op => op.Org).Type<NonNullType<OrgGqlConfiguration>>();
descriptor.Field(op => op.Project).Type<NonNullType<ProjectGqlConfiguration>>();
}
}
4 changes: 2 additions & 2 deletions backend/LexData/Entities/OrgProjectsEntityConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class OrgProjectsEntityConfiguration : EntityBaseConfiguration<OrgProject
public override void Configure(EntityTypeBuilder<OrgProjects> builder)
{
base.Configure(builder);
builder.HasIndex(pu => new { pu.OrgId, pu.ProjectId }).IsUnique();
builder.HasQueryFilter(pu => pu.Project!.DeletedDate == null);
builder.HasIndex(op => new { op.OrgId, op.ProjectId }).IsUnique();
builder.HasQueryFilter(op => op.Project!.DeletedDate == null);
}
}
2 changes: 1 addition & 1 deletion backend/LexData/Entities/ProjectEntityConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public override void Configure(EntityTypeBuilder<Project> builder)
.HasForeignKey(projectUser => projectUser.ProjectId)
.OnDelete(DeleteBehavior.Cascade);
builder.HasMany(p => p.Organizations)
.WithMany(p => p.Projects)
.WithMany(o => o.Projects)
.UsingEntity<OrgProjects>(
op => op.HasOne(op => op.Org).WithMany().HasForeignKey(op => op.OrgId),
op => op.HasOne(op => op.Project).WithMany().HasForeignKey(op => op.ProjectId)
Expand Down

0 comments on commit 634ae02

Please sign in to comment.