Skip to content
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
4 changes: 2 additions & 2 deletions frameworks/simplew/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ FROM mcr.microsoft.com/dotnet/runtime:10.0
WORKDIR /app
COPY --from=build /app .

EXPOSE 8080
ENTRYPOINT ["dotnet", "simplew-bench.dll"]
EXPOSE 8080 8081
ENTRYPOINT ["dotnet", "simplew-bench.dll"]
38 changes: 33 additions & 5 deletions frameworks/simplew/Model.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace SimpleW.Benchmarks;
namespace SimpleW.Benchmarks;

public class DatasetItem
{
public int Id { get; set; }
public string Name { get; set; } = "";
public string Category { get; set; } = "";
public double Price { get; set; }
public int Price { get; set; }
public int Quantity { get; set; }
public bool Active { get; set; }
public List<string>? Tags { get; set; }
Expand All @@ -17,17 +17,29 @@ public class ProcessedItem
public int Id { get; set; }
public string Name { get; set; } = "";
public string Category { get; set; } = "";
public double Price { get; set; }
public int Price { get; set; }
public int Quantity { get; set; }
public bool Active { get; set; }
public List<string>? Tags { get; set; }
public RatingInfo? Rating { get; set; }
public long Total { get; set; }
}

public class DbItem
{
public int Id { get; set; }
public string Name { get; set; } = "";
public string Category { get; set; } = "";
public int Price { get; set; }
public int Quantity { get; set; }
public bool Active { get; set; }
public List<string>? Tags { get; set; }
public RatingInfo? Rating { get; set; }
public double Total { get; set; }
}

public class RatingInfo
{
public double Score { get; set; }
public int Score { get; set; }
public int Count { get; set; }
}

Expand All @@ -37,5 +49,21 @@ public class ListWithCount<T>(List<T> items)
public List<T> Items => items;

public int Count => items.Count;
}

public class CrudListResponse
{
public List<DbItem> Items { get; set; } = [];
public long Total { get; set; }
public int Page { get; set; }
public int Limit { get; set; }
}

public class CrudItem
{
public int Id { get; set; }
public string? Name { get; set; }
public string? Category { get; set; }
public int Price { get; set; }
public int Quantity { get; set; }
}
Loading