mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 16:16:33 +00:00
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();
|
|
}
|
|
}
|
|
}
|