* Extended functionalities
* Added different UIs
This commit is contained in:
54
MealPlan.Api/Models/MealConsumption.cs
Normal file
54
MealPlan.Api/Models/MealConsumption.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace MealPlan.Api.Models;
|
||||
|
||||
[Table("MealConsumptions")]
|
||||
public class MealConsumption
|
||||
{
|
||||
[Column("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("UserId")]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
[Column("RecipeId")]
|
||||
public int? RecipeId { get; set; }
|
||||
|
||||
[Column("MealCategory")]
|
||||
public int MealCategory { get; set; }
|
||||
|
||||
[Column("LogDate")]
|
||||
public DateOnly LogDate { get; set; }
|
||||
|
||||
[Column("ConsumedAt")]
|
||||
public DateTime ConsumedAt { get; set; }
|
||||
|
||||
[Column("Name")]
|
||||
[MaxLength(255)]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Column("Portions")]
|
||||
public decimal Portions { get; set; } = 1m;
|
||||
|
||||
[Column("Calories")]
|
||||
public int? Calories { get; set; }
|
||||
|
||||
[Column("ProteinG")]
|
||||
public decimal? ProteinG { get; set; }
|
||||
|
||||
[Column("FatG")]
|
||||
public decimal? FatG { get; set; }
|
||||
|
||||
[Column("CarbsG")]
|
||||
public decimal? CarbsG { get; set; }
|
||||
|
||||
[Column("Notes")]
|
||||
public string? Notes { get; set; }
|
||||
|
||||
[Column("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
public ApplicationUser? User { get; set; }
|
||||
public Recipe? Recipe { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user