using Server.Git; using System.ComponentModel.DataAnnotations; namespace Server.SQL { public class ConsumableItemData { [Key] public long index { get; set; } public string name { get; set; } public eItemType item_type { get; set; } public string reward { get; set; } } public enum eItemType { exp = 1, package, random } public class ConsumableItemDataExcel { private Dictionary consumableItemData; public string sheetName = "ConsumableItemData"; public ConsumableItemData getConsumableItemData(long key) { return consumableItemData[key]; } public List getConsumableItemData() { return consumableItemData.Values.ToList(); } public void init(sheet data) { this.consumableItemData = new Dictionary(); foreach (var item in data.dicViewer) { //ConsumableItemData ConsumableItemData = new ConsumableItemData(); //ConsumableItemData.index = item.Key; //ConsumableItemData.part = (int)item.Value["part"]; //this.ConsumableItemData.Add(item.Key, ConsumableItemData); } } } }