diff --git a/src/iyixiGames.Domain/Entities/Game.cs b/src/iyixiGames.Domain/Entities/Game.cs index c8f4813..41854b6 100644 --- a/src/iyixiGames.Domain/Entities/Game.cs +++ b/src/iyixiGames.Domain/Entities/Game.cs @@ -11,27 +11,49 @@ namespace iyixiGames.Domain.Entities /// public class Game { + /// + /// Unique identifier for the game. + /// public string Id { get; set; } = Guid.NewGuid().ToString("N"); // Unique game identifier + /// + /// 游戏名称 + /// [Required] [StringLength(100, MinimumLength = 3)] public string Name { get; set; } = string.Empty; // Game name + /// + /// 游戏路径 + /// [Required] [StringLength(1024, MinimumLength = 1)] public string Path { get; set; } = string.Empty; // Game folder name, e.g., "space-adventure" + /// + /// 游戏描述 + /// // New: Game Description [StringLength(1000)] // Adjust max length as needed public string? Description { get; set; } // Short description generated by AI or manually entered + /// + /// 游戏类别 + /// public string Category { get; set; } = string.Empty; // 应用自定义转换器 + + /// + /// 游戏流行度 + /// [JsonPropertyName("popularity")] [JsonConverter(typeof(IntConverter))] [Range(0, 100)] public int Popularity { get; set; } = 0; + /// + /// 游戏平均 + /// [Range(0.0, 5.0)] public double AvgRating { get; set; } = 0.0;