using Server.Git; using System.ComponentModel.DataAnnotations; namespace Server.SQL { public class RewardData { [Key] public long index { get; set; } public eBuyType buy_type { get; set; } public long return_item { get; set; } } public enum eRewardItemType { gold = 1, freecash, paycash, character, equipment, consumable, etc } public class RewardDataExcel { private Dictionary rewardData; public string sheetName = "RewardData"; public RewardData getRewardData(long key) { return rewardData[key]; } public List getRewardData() { return rewardData.Values.ToList(); } public void init(Sheet data) { this.rewardData = new Dictionary(); foreach (var item in data.dicViewer) { RewardData rewardData = new RewardData(); rewardData.index = item.Key; rewardData.buy_type = (eBuyType)item.Value["part"]; rewardData.return_item = (long)item.Value["return_item"]; this.rewardData.Add(item.Key, rewardData); } } } }