using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace MealPlan.Api.Models;

[Table("DietGeneratorDraftMeals")]
public class DietGeneratorDraftMeal
{
    [Column("Id")]
    public int Id { get; set; }

    [Column("SessionId")]
    public int SessionId { get; set; }

    [Column("PlanDate")]
    public DateOnly PlanDate { get; set; }

    [Column("MealCategory")]
    public int MealCategory { get; set; }

    [Column("RecipeId")]
    public int RecipeId { get; set; }

    [Column("Portions")]
    public decimal Portions { get; set; } = 1;

    [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("IsLocked")]
    public bool IsLocked { get; set; }

    [Column("GenerationVersion")]
    public int GenerationVersion { get; set; } = 1;

    public DietGeneratorSession? Session { get; set; }
    public Recipe? Recipe { get; set; }
    public ICollection<DietGeneratorDraftMealIngredient> PlannedIngredients { get; set; } =
        new List<DietGeneratorDraftMealIngredient>();
}
