mirror of
https://github.com/XFox111/MuiCharts.git
synced 2026-04-22 06:51:05 +03:00
Added ASP.NET backend with SQLite
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MuiCharts.Contracts.Point;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get a collection of points.
|
||||
/// </summary>
|
||||
public record class GetPointsRequest(
|
||||
[Range(1, int.MaxValue)]
|
||||
int Page = 1,
|
||||
[Range(1, int.MaxValue)]
|
||||
int Count = 50
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace MuiCharts.Contracts.Point;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the response object for retrieving points.
|
||||
/// </summary>
|
||||
public record class GetPointsResponse(
|
||||
PointResponse[] Points,
|
||||
int TotalCount,
|
||||
int Count,
|
||||
int Page
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace MuiCharts.Contracts.Point;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response object containing information about a point.
|
||||
/// </summary>
|
||||
public record PointResponse(
|
||||
int Id,
|
||||
string Name,
|
||||
int Height
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MuiCharts.Contracts.Point;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to upsert a point.
|
||||
/// </summary>
|
||||
public record UpsertPointRequest(
|
||||
[MinLength(1)] string Name,
|
||||
int Height
|
||||
);
|
||||
Reference in New Issue
Block a user