using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes;

namespace NB.Game;

public enum ItemType
{
    None = 0,
    Item,
    Equip,
    Fish,
}

public class Item : Entity
{
    /// <summary>
    /// 拥有的数量
    /// </summary>
    [BsonElement("c")] public int Count;

    /// <summary>
    /// 配置id
    /// </summary>
    [BsonElement("cid")] public int ConfigId;

    /// <summary>
    /// 是否绑定
    /// </summary>
    [BsonElement("ib")] public bool IsBind;

    /// <summary>
    /// 失效时间
    /// </summary>
    [BsonElement("et")] public long ExpirationTime;

    /// <summary>
    /// 获得时间
    /// </summary>
    [BsonElement("gt")] public long GetTime;

    /// <summary>
    /// 耐久度
    /// </summary>
    [BsonElement("abr")] public int Abrasion;

    /// <summary>
    /// 物品所属的容器
    /// </summary>
    [BsonIgnore] ItemContainer Container;
}