namespace Health.Domain.Entities;

/// <summary>
/// 运动计划（按周）
/// </summary>
public sealed class ExercisePlan
{
    public Guid Id { get; set; }
    public Guid UserId { get; set; }
    public DateOnly StartDate { get; set; }
    public DateOnly EndDate { get; set; }
    public TimeOnly ReminderTime { get; set; } = new(19, 0);
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    public User User { get; set; } = null!;
    public ICollection<ExercisePlanItem> Items { get; set; } = [];
}

/// <summary>
/// 运动计划每日条目
/// </summary>
public sealed class ExercisePlanItem
{
    public Guid Id { get; set; }
    public Guid PlanId { get; set; }
    public DateOnly ScheduledDate { get; set; }
    public string ExerciseType { get; set; } = string.Empty; // 散步/慢跑/游泳
    public int DurationMinutes { get; set; }
    public bool IsCompleted { get; set; }
    public DateTime? CompletedAt { get; set; }
    public bool IsRestDay { get; set; }

    public ExercisePlan Plan { get; set; } = null!;
}
