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