28 lines
1020 B
C#
28 lines
1020 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Fitness_core_BE.Models
|
|
{
|
|
public class Meal
|
|
{
|
|
[Key]
|
|
public Guid MealId { get; set; }
|
|
public string Name { get; set; } = string.Empty;
|
|
public string? Description { get; set; }
|
|
public decimal? Calories { get; set; }
|
|
public decimal? Protein { get; set; }
|
|
public decimal? Carbohydrates { get; set; }
|
|
public decimal? Fats { get; set; }
|
|
public string? ServingSize { get; set; }
|
|
public string? MealItems { get; set; } // JSON: {"Chicken": {"qountity" : 10pc, "Kal" : "40kal"}, "Rice": "200g"}
|
|
public string? PreparationNotes { get; set; }
|
|
|
|
public Guid FKMealPlanId { get; set; }
|
|
[ForeignKey("FKMealPlanId")]
|
|
public virtual MealPlan? MealPlan { get; set; }
|
|
|
|
public bool IsActive { get; set; } = true;
|
|
public DateTime CreateDate { get; set; } = DateTime.UtcNow;
|
|
}
|
|
}
|