namespace Health.Domain.Entities;

/// <summary>
/// 用户（患者）
/// </summary>
public sealed class User
{
    public Guid Id { get; set; }
    public string Phone { get; set; } = string.Empty;
    public string? Name { get; set; }
    public string? Gender { get; set; }
    public DateOnly? BirthDate { get; set; }
    public string? AvatarUrl { get; set; }
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    // 导航属性
    public ICollection<HealthRecord> HealthRecords { get; set; } = [];
    public ICollection<Medication> Medications { get; set; } = [];
    public ICollection<DietRecord> DietRecords { get; set; } = [];
    public ICollection<ExercisePlan> ExercisePlans { get; set; } = [];
    public ICollection<Report> Reports { get; set; } = [];
    public ICollection<Conversation> Conversations { get; set; } = [];
    public ICollection<Consultation> Consultations { get; set; } = [];
    public ICollection<FollowUp> FollowUps { get; set; } = [];
    public ICollection<DeviceToken> DeviceTokens { get; set; } = [];
    public HealthArchive? HealthArchive { get; set; }
    public NotificationPreference? NotificationPreference { get; set; }
}
