feature: Prometheus Metrics, Supervisor Dashboard, and Promotion Retry Job

This commit is contained in:
voltsrage
2026-06-27 13:29:04 +08:00
parent e22d33b654
commit 04bdb7e85c
31 changed files with 4482 additions and 259 deletions
@@ -1055,6 +1055,56 @@ namespace VigilCareRecordsAPI.Data.Migrations
});
});
modelBuilder.Entity("PromotionAttempt", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id")
.HasDefaultValueSql("gen_random_uuid()");
b.Property<int>("AttemptNumber")
.HasColumnType("integer")
.HasColumnName("attempt_number");
b.Property<DateTimeOffset>("AttemptedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasColumnName("attempted_at")
.HasDefaultValueSql("NOW()");
b.Property<Guid>("BatchId")
.HasColumnType("uuid")
.HasColumnName("batch_id");
b.Property<string>("ErrorMessage")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)")
.HasColumnName("error_message");
b.Property<DateTimeOffset?>("NextRetryAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("next_retry_at");
b.Property<bool>("Succeeded")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("succeeded");
b.HasKey("Id");
b.HasIndex("NextRetryAt")
.HasDatabaseName("ix_promotion_attempts_pending_retry")
.HasFilter("succeeded = false AND next_retry_at IS NOT NULL");
b.HasIndex("BatchId", "AttemptNumber")
.IsUnique()
.HasDatabaseName("ix_promotion_attempts_batch_attempt");
b.ToTable("promotion_attempts", (string)null);
});
modelBuilder.Entity("RefreshToken", b =>
{
b.Property<Guid>("Id")
@@ -1345,6 +1395,17 @@ namespace VigilCareRecordsAPI.Data.Migrations
b.Navigation("Patient");
});
modelBuilder.Entity("PromotionAttempt", b =>
{
b.HasOne("DigitizationBatch", "Batch")
.WithMany()
.HasForeignKey("BatchId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Batch");
});
modelBuilder.Entity("RefreshToken", b =>
{
b.HasOne("RefreshToken", "ReplacedByToken")