Files
AI-Health/backend/src/Health.Domain/Entities/consultation.cs
MingNian c70d5d4be6 fix: 管理员系统 + 注册流程重构 + UI改版 + 全链路修复
- 新增管理员角色(手机号12345678910),管理员可增删医生、查看患者
- 注册页重构:去掉角色选择+审核码,改为选医生+填姓名
- 医生端点按DoctorId过滤患者,Patient↔Doctor关系建立
- Doctor/DoctorProfile/User实体新增关联字段
- JSON循环引用修复(IgnoreCycles)
- /api/doctors改为公开接口
- 登录闪屏修复+原生Android启动页
- 输入框全局白底+灰框
- 蓝牙重连同步修复
- Web端(doctor_web+health_app/web)全部删除
- 全局UI改版:白底企业风,新配色和组件系统
- 新品牌图标和启动图
2026-06-16 15:16:44 +08:00

56 lines
1.8 KiB
C#

using Health.Domain.Enums;
namespace Health.Domain.Entities;
/// <summary>
/// 问诊会话
/// </summary>
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<ConsultationMessage> Messages { get; set; } = [];
}
/// <summary>
/// 问诊消息
/// </summary>
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!;
}
/// <summary>
/// 医生
/// </summary>
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? Phone { get; set; } // 医生手机号
public string? ProfessionalDirection { 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<Consultation> Consultations { get; set; } = [];
}