punish v6.8.18.0
This commit is contained in:
commit
e786325cda
322 changed files with 554232 additions and 0 deletions
14
LLib/LLib.Shop.Model/ItemForSale.cs
Normal file
14
LLib/LLib.Shop.Model/ItemForSale.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
namespace LLib.Shop.Model;
|
||||
|
||||
public sealed class ItemForSale
|
||||
{
|
||||
public required int Position { get; init; }
|
||||
|
||||
public required uint ItemId { get; init; }
|
||||
|
||||
public required string? ItemName { get; init; }
|
||||
|
||||
public required uint Price { get; init; }
|
||||
|
||||
public required uint OwnedItems { get; init; }
|
||||
}
|
24
LLib/LLib.Shop.Model/PurchaseState.cs
Normal file
24
LLib/LLib.Shop.Model/PurchaseState.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
|
||||
namespace LLib.Shop.Model;
|
||||
|
||||
public sealed class PurchaseState
|
||||
{
|
||||
public int DesiredItems { get; }
|
||||
|
||||
public int OwnedItems { get; set; }
|
||||
|
||||
public int ItemsLeftToBuy => Math.Max(0, DesiredItems - OwnedItems);
|
||||
|
||||
public bool IsComplete => ItemsLeftToBuy == 0;
|
||||
|
||||
public bool IsAwaitingYesNo { get; set; }
|
||||
|
||||
public DateTime NextStep { get; set; } = DateTime.MinValue;
|
||||
|
||||
public PurchaseState(int desiredItems, int ownedItems)
|
||||
{
|
||||
DesiredItems = desiredItems;
|
||||
OwnedItems = ownedItems;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue