using Health.Domain.Enums;
namespace Health.Domain.Entities;
///
/// 饮食记录
///
public sealed class DietRecord
{
public Guid Id { get; set; }
public Guid UserId { get; set; }
public MealType MealType { get; set; }
public int? TotalCalories { get; set; }
public int? HealthScore { get; set; } // 1-5 星
public DateOnly RecordedAt { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public User User { get; set; } = null!;
public ICollection FoodItems { get; set; } = [];
}
///
/// 饮食记录中的食物条目
///
public sealed class DietFoodItem
{
public Guid Id { get; set; }
public Guid DietRecordId { get; set; }
public string Name { get; set; } = string.Empty;
public string? Portion { get; set; }
public int? Calories { get; set; }
public decimal? ProteinGrams { get; set; }
public decimal? CarbsGrams { get; set; }
public decimal? FatGrams { get; set; }
public string? Warning { get; set; }
public int SortOrder { get; set; }
public DietRecord DietRecord { get; set; } = null!;
}