All checks were successful
Deploy Promiscuity Auth API / deploy (push) Successful in 48s
Deploy Promiscuity Character API / deploy (push) Successful in 46s
Deploy Promiscuity Crafting API / deploy (push) Successful in 1m9s
Deploy Promiscuity Inventory API / deploy (push) Successful in 46s
Deploy Promiscuity Locations API / deploy (push) Successful in 48s
Deploy Promiscuity Mail API / deploy (push) Successful in 46s
k8s smoke test / test (push) Successful in 8s
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
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
|
|
};
|
|
}
|