mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-22 03:59:35 +08:00

* 补充数据库表 * 更新sqlite * 添加商店相关的数据库常量类 * add Update_UpdateRoomMaster * 修改常量类 * 添加 NOTICE 文件 * 添加市场、报价、库存的数据库常量类 * 优化表结构和查询常量类 * 添加 UserCenter 和 Inventory 相关枚举;数据表和 Query 常量类修改 * 添加报价的核心操作 * 涉及库存的物品获取应该使用 Guid 而不是 ItemId --------- Co-authored-by: yeziuku <yezi@wrss.org>
29 lines
865 B
C#
29 lines
865 B
C#
using Milimoe.FunGame.Core.Api.Utility;
|
|
using Milimoe.FunGame.Core.Interface.Entity;
|
|
using Milimoe.FunGame.Core.Library.Constant;
|
|
|
|
namespace Milimoe.FunGame.Core.Entity
|
|
{
|
|
public class MarketItem : BaseEntity
|
|
{
|
|
public User User { get; set; }
|
|
public Item Item { get; set; }
|
|
public double Price { get; set; } = 0;
|
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
|
public DateTime? FinishTime { get; set; } = null;
|
|
public MarketItemState Status { get; set; } = MarketItemState.Listed;
|
|
public User? Buyer { get; set; } = null;
|
|
|
|
public override bool Equals(IBaseEntity? other)
|
|
{
|
|
return other is MarketItem && other?.Id == Id;
|
|
}
|
|
|
|
public MarketItem()
|
|
{
|
|
User = Factory.GetUser();
|
|
Item = Factory.GetItem();
|
|
}
|
|
}
|
|
}
|