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

namespace NB.Game;

public enum ItemBasicType
{
    None,
    Currency = 1,
    Item = 2,
    Fish = 3,
}

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

    /// <summary>
    /// 配置id
    /// </summary>
    [BsonElement("cid")] public uint 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] PlayerItemContainerComponent Container;
}