using XGame.Database;

namespace FL.Data.Items
{
    public class Item : IItem
    {
        /// <summary>
        /// 道具唯一id
        /// </summary>
        public long Id { get; private set; }
        public ItemTable Table { get; private set; }

        public int TableId => Table.Id;

        public EItemType ItemType => (EItemType)Table.Type;

        public EQualityLevel Quality => Table.Quality;

        public string Name => Table.Name;

        public string Icon => Table.Icon;

        public int Level { set; get; }

        public string Description => Table.Desc;

        public string Count { get; set; }


        public void Init(ItemTable table, long id)
        {
            Table = table;
            Id = id;
        }
    }
}
