using Health.Domain.Enums;
using System.ComponentModel.DataAnnotations.Schema;

namespace Health.Domain.Entities;

/// <summary>
/// 检查报告
/// </summary>
public sealed class Report
{
    public Guid Id { get; set; }
    public Guid UserId { get; set; }
    public string FileUrl { get; set; } = string.Empty;
    public ReportFileType FileType { get; set; }
    public ReportCategory Category { get; set; }
    public string? AiSummary { get; set; }        // AI 预解读结果
    [Column(TypeName = "jsonb")]
    public string? AiIndicators { get; set; }      // JSONB: [{name, value, unit, range, status}]
    public ReportStatus Status { get; set; }
    public string? DoctorComment { get; set; }     // 医生审核意见
    public string? DoctorName { get; set; }
    public DateTime? ReviewedAt { get; set; }
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

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