thewar_server/Server/SQL/ShopItemData.cs

50 lines
1.2 KiB
C#

using Server.Git;
using System.ComponentModel.DataAnnotations;
namespace Server.SQL
{
public class ShopItemData
{
[Key]
public long index { get; set; }
public eBuyType buy_type { get; set; }
public int buy { get; set; }
public long reward { get; set; }
}
public enum eBuyType
{
gold = 1,
cash,
money
}
public class ShopItemDataExcel
{
private Dictionary<long, ShopItemData> shopItemData;
public string sheetName = "ShopItemData";
public ShopItemData getShopItemData(long key)
{
return shopItemData[key];
}
public List<ShopItemData> getShopItemData()
{
return shopItemData.Values.ToList();
}
public void init(sheet data)
{
this.shopItemData = new Dictionary<long, ShopItemData>();
foreach (var item in data.dicViewer)
{
//ShopItemData ShopItemData = new ShopItemData();
//ShopItemData.index = item.Key;
//ShopItemData.part = (int)item.Value["part"];
//this.ShopItemData.Add(item.Key, ShopItemData);
}
}
}
}