using Health.Domain.Enums;

namespace Health.Domain.Entities;

/// <summary>
/// 健康数据记录（血压/心率/血糖/血氧/体重）
/// </summary>
public sealed class HealthRecord
{
    public Guid Id { get; set; }
    public Guid UserId { get; set; }
    public HealthMetricType MetricType { get; set; }
    public int? Systolic { get; set; }      // 血压收缩压
    public int? Diastolic { get; set; }     // 血压舒张压
    public decimal? Value { get; set; }     // 通用数值（心率/血糖/血氧/体重）
    public string? Unit { get; set; }       // 单位
    public HealthRecordSource Source { get; set; }
    public bool IsAbnormal { get; set; }
    public DateTime RecordedAt { get; set; }
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    public User User { get; set; } = null!;
}
