Initial commit
This commit is contained in:
33
MealPlan.Api/Models/Ingredient.cs
Normal file
33
MealPlan.Api/Models/Ingredient.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace MealPlan.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Maps to the existing "Ingredients" table.
|
||||
/// </summary>
|
||||
[Table("Ingredients")]
|
||||
public class Ingredient
|
||||
{
|
||||
[Column("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("RecipeId")]
|
||||
public int RecipeId { get; set; }
|
||||
|
||||
[Column("Name")]
|
||||
[MaxLength(255)]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Column("AmountGrams")]
|
||||
public decimal? AmountGrams { get; set; }
|
||||
|
||||
[Column("Unit")]
|
||||
[MaxLength(50)]
|
||||
public string? Unit { get; set; }
|
||||
|
||||
[Column("SortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
public Recipe? Recipe { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user