feat: 完成
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Yi.Framework.DigitalCollectibles.Domain.Entities;
|
||||
/// 表示用户与藏品的库存关系
|
||||
/// </summary>
|
||||
[SugarTable("DC_CollectiblesUserStore")]
|
||||
public class CollectiblesUserStoreAggregateRoot:FullAuditedAggregateRoot<Guid>
|
||||
public class CollectiblesUserStoreAggregateRoot : FullAuditedAggregateRoot<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
@@ -24,4 +24,27 @@ public class CollectiblesUserStoreAggregateRoot:FullAuditedAggregateRoot<Guid>
|
||||
/// 用户是否已读
|
||||
/// </summary>
|
||||
public bool IsRead { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否正在市场交易
|
||||
/// </summary>
|
||||
public bool IsAtMarketing { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上架货物
|
||||
/// </summary>
|
||||
public void ShelvedMarket()
|
||||
{
|
||||
IsAtMarketing = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 交易货物
|
||||
/// </summary>
|
||||
public void PurchaseMarket(Guid userId)
|
||||
{
|
||||
UserId = userId;
|
||||
IsAtMarketing = false;
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,22 @@ namespace Yi.Framework.DigitalCollectibles.Domain.Entities;
|
||||
/// 用于定时任务处理自动挖矿
|
||||
/// </summary>
|
||||
[SugarTable("DC_OnHook")]
|
||||
public class OnHookAggregateRoot:FullAuditedAggregateRoot<Guid>
|
||||
public class OnHookAggregateRoot : FullAuditedAggregateRoot<Guid>
|
||||
{
|
||||
public OnHookAggregateRoot()
|
||||
{
|
||||
}
|
||||
|
||||
public OnHookAggregateRoot(Guid userId, int effectiveHours)
|
||||
{
|
||||
UserId = userId;
|
||||
EffectiveHours = effectiveHours;
|
||||
StarTime = DateTime.Now;
|
||||
EndTime = DateTime.Now.AddHours(effectiveHours);
|
||||
IsActive = true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
@@ -20,19 +34,19 @@ public class OnHookAggregateRoot:FullAuditedAggregateRoot<Guid>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public DateTime? StarTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 有效小时数
|
||||
/// </summary>
|
||||
public int EffectiveHours{ get; set; }
|
||||
|
||||
public int EffectiveHours { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否激活
|
||||
/// </summary>
|
||||
public bool IsActive{ get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user