1
This commit is contained in:
parent
9fd956ae39
commit
0358ebca2a
@ -11,27 +11,49 @@ namespace iyixiGames.Domain.Entities
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Game
|
public class Game
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Unique identifier for the game.
|
||||||
|
/// </summary>
|
||||||
public string Id { get; set; } = Guid.NewGuid().ToString("N"); // Unique game identifier
|
public string Id { get; set; } = Guid.NewGuid().ToString("N"); // Unique game identifier
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏名称
|
||||||
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
[StringLength(100, MinimumLength = 3)]
|
[StringLength(100, MinimumLength = 3)]
|
||||||
public string Name { get; set; } = string.Empty; // Game name
|
public string Name { get; set; } = string.Empty; // Game name
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏路径
|
||||||
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
[StringLength(1024, MinimumLength = 1)]
|
[StringLength(1024, MinimumLength = 1)]
|
||||||
public string Path { get; set; } = string.Empty; // Game folder name, e.g., "space-adventure"
|
public string Path { get; set; } = string.Empty; // Game folder name, e.g., "space-adventure"
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏描述
|
||||||
|
/// </summary>
|
||||||
// New: Game Description
|
// New: Game Description
|
||||||
[StringLength(1000)] // Adjust max length as needed
|
[StringLength(1000)] // Adjust max length as needed
|
||||||
public string? Description { get; set; } // Short description generated by AI or manually entered
|
public string? Description { get; set; } // Short description generated by AI or manually entered
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏类别
|
||||||
|
/// </summary>
|
||||||
public string Category { get; set; } = string.Empty;
|
public string Category { get; set; } = string.Empty;
|
||||||
// 应用自定义转换器
|
// 应用自定义转换器
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏流行度
|
||||||
|
/// </summary>
|
||||||
[JsonPropertyName("popularity")]
|
[JsonPropertyName("popularity")]
|
||||||
[JsonConverter(typeof(IntConverter))]
|
[JsonConverter(typeof(IntConverter))]
|
||||||
[Range(0, 100)]
|
[Range(0, 100)]
|
||||||
public int Popularity { get; set; } = 0;
|
public int Popularity { get; set; } = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏平均
|
||||||
|
/// </summary>
|
||||||
[Range(0.0, 5.0)]
|
[Range(0.0, 5.0)]
|
||||||
public double AvgRating { get; set; } = 0.0;
|
public double AvgRating { get; set; } = 0.0;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user