Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(summary): Use double instead of int for FTE #703

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading