Skip to content

Commit

Permalink
Remove InspectionFindings table temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadUsama-afk-equinor committed Nov 15, 2023
1 parent f63ac1e commit 8da0faa
Show file tree
Hide file tree
Showing 10 changed files with 1,350 additions and 103 deletions.
5 changes: 3 additions & 2 deletions backend/api/Controllers/InspectionFindingsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ IInspectionService inspectionService
/// </summary>
/// <remarks>
/// </remarks>
[HttpPost("add-findings")]
/* [HttpPost("add-findings")]
[Authorize(Roles = Role.Admin)]
[ProducesResponseType(typeof(InspectionFindings), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
Expand Down Expand Up @@ -89,7 +89,8 @@ public async Task<ActionResult<Inspection>> GetInspections([FromRoute] string id
}
return NotFound("Could not find any inspection with the provided '{id}'");
}

*/
}


}
4 changes: 2 additions & 2 deletions backend/api/Database/Context/FlotillaDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
}
);
});
modelBuilder.Entity<Inspection>(inspectionEntity =>
/*modelBuilder.Entity<Inspection>(inspectionEntity =>
{
if (isSqlLite) { AddConverterForDateTimeOffsets(ref inspectionEntity); }
inspectionEntity.OwnsMany(i => i.InspectionFindings);
});

*/
modelBuilder.Entity<MissionDefinition>()
.Property(m => m.InspectionFrequency)
.HasConversion(new TimeSpanToTicksConverter());
Expand Down
2 changes: 1 addition & 1 deletion backend/api/Database/Models/Inspection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ or InspectionStatus.Successful

public DateTime? EndTime { get; private set; }

public List<InspectionFindings> InspectionFindings { get; set; }
//public List<InspectionFindings> InspectionFindings { get; set; }

public void UpdateWithIsarInfo(IsarStep isarStep)
{
Expand Down
38 changes: 0 additions & 38 deletions backend/api/Database/Models/InspectionFindings.cs

This file was deleted.

Loading

0 comments on commit 8da0faa

Please sign in to comment.