feat: 应用内通知系统 + 结构化手术史/用药等相关改动
- 新增用户通知 outbox 流水线(EfUserNotificationPipeline)与后台投递 worker - 通知中心页面及前端通知服务接入 - 健康指标异常、用药/运动提醒等事件统一产出站内通知 - 健康档案结构化手术史、用药提醒扫描、医生/用户端点等配套调整 - AppDbContext 注册通知相关实体
This commit is contained in:
@@ -38,6 +38,18 @@ public sealed class HealthArchive
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public User User { get; set; } = null!;
|
||||
public ICollection<HealthArchiveSurgery> Surgeries { get; set; } = [];
|
||||
}
|
||||
|
||||
public sealed class HealthArchiveSurgery
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid HealthArchiveId { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public DateOnly? Date { get; set; }
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
public HealthArchive HealthArchive { get; set; } = null!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -97,3 +109,20 @@ public sealed class DeviceToken
|
||||
|
||||
public User User { get; set; } = null!;
|
||||
}
|
||||
|
||||
public sealed class UserNotification
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public Guid SourceId { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Message { get; set; } = string.Empty;
|
||||
public string Severity { get; set; } = "info";
|
||||
public string? ActionType { get; set; }
|
||||
public string? ActionTargetId { get; set; }
|
||||
public bool IsRead { get; set; }
|
||||
public DateTime? ReadAt { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user