using Health.Domain.Enums;
namespace Health.Domain.Entities;
///
/// 问诊会话
///
public sealed class Consultation
{
public Guid Id { get; set; }
public Guid UserId { get; set; }
public Guid DoctorId { get; set; }
public ConsultationStatus Status { get; set; }
public int Month { get; set; } // 所属月份,用于配额计算
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? ClosedAt { get; set; }
public User User { get; set; } = null!;
public Doctor Doctor { get; set; } = null!;
public ICollection Messages { get; set; } = [];
}
///
/// 问诊消息
///
public sealed class ConsultationMessage
{
public Guid Id { get; set; }
public Guid ConsultationId { get; set; }
public ConsultationSenderType SenderType { get; set; }
public string? SenderName { get; set; }
public string Content { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public Consultation Consultation { get; set; } = null!;
}
///
/// 医生
///
public sealed class Doctor
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Title { get; set; } // 主任医师/副主任医师
public string? Department { get; set; } // 心血管内科/营养科
public string? AvatarUrl { get; set; }
public string? Introduction { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public ICollection Consultations { get; set; } = [];
}