Mailbox support + crafting api

This commit is contained in:
hz
2026-03-26 09:36:42 -05:00
parent a8db66b93e
commit a283969e4c
22 changed files with 1026 additions and 17 deletions
@@ -0,0 +1,32 @@
namespace CraftingApi.Models;
public class CraftingRecipeResponse
{
public string RecipeKey { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Category { get; set; } = string.Empty;
public string StationType { get; set; } = string.Empty;
public List<CraftingIngredient> Inputs { get; set; } = [];
public List<CraftingIngredient> Outputs { get; set; } = [];
public int CraftTimeSeconds { get; set; }
public bool Enabled { get; set; }
public static CraftingRecipeResponse FromModel(CraftingRecipe recipe) => new()
{
RecipeKey = recipe.RecipeKey,
Name = recipe.Name,
Category = recipe.Category,
StationType = recipe.StationType,
Inputs = recipe.Inputs.Select(i => new CraftingIngredient { ItemKey = i.ItemKey, Quantity = i.Quantity }).ToList(),
Outputs = recipe.Outputs.Select(i => new CraftingIngredient { ItemKey = i.ItemKey, Quantity = i.Quantity }).ToList(),
CraftTimeSeconds = recipe.CraftTimeSeconds,
Enabled = recipe.Enabled
};
}