Commit b803db99 authored by Martin Tvarožek's avatar Martin Tvarožek
Browse files

docs: add documentation to models

parent 88d1b2a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3,6 +3,10 @@ using Avalonia.Media;

namespace GarrigueGamesLauncher.Models;

/// <summary>
/// Represents a game in the launcher, including metadata such as IDs, name, paths,
/// authors, description, images, and genre tags.
/// </summary>
public record Game
{
    public required string GameId { get; set; }
+5 −0
Original line number Diff line number Diff line
@@ -3,6 +3,11 @@ using System.ComponentModel.DataAnnotations;

namespace GarrigueGamesLauncher.Models;

/// <summary>
/// Represents the data structure used for storing and transferring game information.
/// This DTO is used for serialization/deserialization from <c>data.json</c> files in the
/// game directories.
/// </summary>
public record GameDto
{
    [Required]
+5 −0
Original line number Diff line number Diff line
namespace GarrigueGamesLauncher.Models;

/// <summary>
/// Represents basic usage statistics for a game.
/// This model is typically retrieved from the database and not directly serialized
/// by the launcher.
/// </summary>
public record GameStatsDto
{
    public required int PlayCount { get; set; }
+4 −0
Original line number Diff line number Diff line
namespace GarrigueGamesLauncher.Models;

/// <summary>
/// Represents a lightweight reference to a game retrieved from the database.
/// Can be used to load additional information about the game from the provided directory.
/// </summary>
public record GameStubDto
{
    public required string GameId { get; set; }
+4 −0
Original line number Diff line number Diff line
using Pivo.Client;
using GarrigueGamesLauncher.Controls;

namespace GarrigueGamesLauncher.Models;

/// <summary>
/// Represents a checkbox for selecting a genre tag in the <see cref="CheckboxDropdown" /> control.
/// </summary>
public record GenreTagCheckboxItem {
    public bool IsChecked { get; set; }
    public required GameTagItem Tag { get; set; }
Loading