Skip to content

Commit 68a4de8

Browse files
authored
Merge pull request #655 from stratdev3/update-simplew
Update simplew
2 parents 3c47f81 + f6f4d73 commit 68a4de8

6 files changed

Lines changed: 413 additions & 188 deletions

File tree

frameworks/simplew/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ FROM mcr.microsoft.com/dotnet/runtime:10.0
1111
WORKDIR /app
1212
COPY --from=build /app .
1313

14-
EXPOSE 8080
15-
ENTRYPOINT ["dotnet", "simplew-bench.dll"]
14+
EXPOSE 8080 8081
15+
ENTRYPOINT ["dotnet", "simplew-bench.dll"]

frameworks/simplew/Model.cs

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
namespace SimpleW.Benchmarks;
1+
namespace SimpleW.Benchmarks;
22

33
public class DatasetItem
44
{
55
public int Id { get; set; }
66
public string Name { get; set; } = "";
77
public string Category { get; set; } = "";
8-
public double Price { get; set; }
8+
public int Price { get; set; }
99
public int Quantity { get; set; }
1010
public bool Active { get; set; }
1111
public List<string>? Tags { get; set; }
@@ -17,17 +17,29 @@ public class ProcessedItem
1717
public int Id { get; set; }
1818
public string Name { get; set; } = "";
1919
public string Category { get; set; } = "";
20-
public double Price { get; set; }
20+
public int Price { get; set; }
21+
public int Quantity { get; set; }
22+
public bool Active { get; set; }
23+
public List<string>? Tags { get; set; }
24+
public RatingInfo? Rating { get; set; }
25+
public long Total { get; set; }
26+
}
27+
28+
public class DbItem
29+
{
30+
public int Id { get; set; }
31+
public string Name { get; set; } = "";
32+
public string Category { get; set; } = "";
33+
public int Price { get; set; }
2134
public int Quantity { get; set; }
2235
public bool Active { get; set; }
2336
public List<string>? Tags { get; set; }
2437
public RatingInfo? Rating { get; set; }
25-
public double Total { get; set; }
2638
}
2739

2840
public class RatingInfo
2941
{
30-
public double Score { get; set; }
42+
public int Score { get; set; }
3143
public int Count { get; set; }
3244
}
3345

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

3951
public int Count => items.Count;
52+
}
53+
54+
public class CrudListResponse
55+
{
56+
public List<DbItem> Items { get; set; } = [];
57+
public long Total { get; set; }
58+
public int Page { get; set; }
59+
public int Limit { get; set; }
60+
}
4061

62+
public class CrudItem
63+
{
64+
public int Id { get; set; }
65+
public string? Name { get; set; }
66+
public string? Category { get; set; }
67+
public int Price { get; set; }
68+
public int Quantity { get; set; }
4169
}

0 commit comments

Comments
 (0)