using System;
using System.Collections.Generic;
using LeanCloud.Storage.Internal;
namespace LeanCloud {
///
/// 归档的排行榜
///
public class AVLeaderboardArchive {
///
/// 名称
///
/// The name of the statistic.
public string StatisticName {
get; internal set;
}
///
/// 版本号
///
/// The version.
public int Version {
get; internal set;
}
///
/// 状态
///
/// The status.
public string Status {
get; internal set;
}
///
/// 下载地址
///
/// The URL.
public string Url {
get; internal set;
}
///
/// 激活时间
///
/// The activated at.
public DateTime ActivatedAt {
get; internal set;
}
///
/// 归档时间
///
/// The deactivated at.
public DateTime DeactivatedAt {
get; internal set;
}
AVLeaderboardArchive() {
}
internal static AVLeaderboardArchive Parse(IDictionary data) {
if (data == null) {
throw new ArgumentNullException(nameof(data));
}
AVLeaderboardArchive archive = new AVLeaderboardArchive {
StatisticName = data["statisticName"].ToString(),
Version = int.Parse(data["version"].ToString()),
Status = data["status"].ToString(),
Url = data["url"].ToString(),
ActivatedAt = (DateTime)AVDecoder.Instance.Decode(data["activatedAt"]),
DeactivatedAt = (DateTime)AVDecoder.Instance.Decode(data["activatedAt"])
};
return archive;
}
}
}