Skip to content

Commit

Permalink
fix(summary): Use double instead of int for FTE (#703)
Browse files Browse the repository at this point in the history
Changes the db type of FTE from int to double.
  • Loading branch information
Jonathanio123 authored Sep 17, 2024
1 parent fdd2138 commit d24676e
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ namespace Fusion.Summary.Api.Controllers.ApiModels;
public class ApiPersonnelMoreThan100PercentFTE
{
public required string FullName { get; set; }
public required int FTE { get; set; }
public required double FTE { get; set; }
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Fusion.Summary.Api.Database.Migrations
{
/// <inheritdoc />
public partial class FTE_FromInt_ToDouble : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{

}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.ValueGeneratedOnAdd()
.HasColumnType("int");
b1.Property<int>("FTE")
.HasColumnType("int");
b1.Property<double>("FTE")
.HasColumnType("float");
b1.Property<string>("FullName")
.IsRequired()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ internal static void OnModelCreating(ModelBuilder modelBuilder)
public class DbPersonnelMoreThan100PercentFTE
{
public required string FullName { get; set; }
public required int FTE { get; set; }
public required double FTE { get; set; }
}

public class DbEndingPosition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public DbWeeklySummaryReport ToDbSummaryReport()
public class PersonnelMoreThan100PercentFTE
{
public required string FullName { get; set; }
public required int FTE { get; set; }
public required double FTE { get; set; }
}

public class EndingPosition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static async Task<TestClientHttpResponse<object>> PutWeeklySummaryReportA
FullName = i.ToString(),
FTE = i
};
})
}).Concat([new ApiPersonnelMoreThan100PercentFTE() { FullName = "DoubleValue", FTE = 6.21 }])
.ToArray()
};

Expand Down

0 comments on commit d24676e

Please sign in to comment.