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,25 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MuiCharts.Domain.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a point with an ID, name, and height.
|
||||
/// </summary>
|
||||
public class Point
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the ID of the point.
|
||||
/// </summary>
|
||||
public required int Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the point.
|
||||
/// </summary>
|
||||
[MinLength(1)]
|
||||
public required string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the height of the point.
|
||||
/// </summary>
|
||||
public required int Height { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using MuiCharts.Domain.Enums;
|
||||
|
||||
namespace MuiCharts.Domain.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a track with information about the first point ID, second point ID, distance, surface, and maximum speed.
|
||||
/// </summary>
|
||||
public class Track
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the first ID.
|
||||
/// </summary>
|
||||
public required int FirstId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the second ID.
|
||||
/// </summary>
|
||||
public required int SecondId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the distance.
|
||||
/// </summary>
|
||||
[Range(1, int.MaxValue)]
|
||||
public required int Distance { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the surface.
|
||||
/// </summary>
|
||||
public required Surface Surface { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum speed.
|
||||
/// </summary>
|
||||
public required MaxSpeed MaxSpeed { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user