using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudGaming.DtoModel.Game;

/// <summary>
/// 游玩历史  
/// </summary>
public class GameHistoryListDto : GameListDto
{
    public GameHistoryListDto() { }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="gameInfo"></param>
    public GameHistoryListDto(GameInfo gameInfo) : base(gameInfo, Epg.EpgEnum.ImageResStyle.小LOGO)
    { }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="gameInfo">游戏</param>
    /// <param name="playtime">游玩时间</param>
    public GameHistoryListDto(GameInfo gameInfo, int playtime) : base(gameInfo, Epg.EpgEnum.ImageResStyle.小LOGO)
    {
        this.Playtime = $"{(playtime / 60.0).ToString("0.##")}小时";
    }
    /// <summary>
    /// 
    /// </summary>
    /// <param name="gameInfo">游戏</param>
    /// <param name="playtime">游玩时间</param>
    public GameHistoryListDto(GameInfo gameInfo, int playtime, Epg.EpgEnum.ImageResStyle imageResStyle) : base(gameInfo, imageResStyle)
    {
        this.Playtime = $"{(playtime / 60.0).ToString("0.##")}小时";
    }

    /// <summary>
    /// 游玩时间
    /// </summary>
    public string Playtime { get; set; }
}
