release: prepare RealeseV2.3

This commit is contained in:
hectorzhao
2026-08-06 10:48:36 +08:00
parent 57b58f1c40
commit 8ad8e61793
37 changed files with 997 additions and 64 deletions
+51 -4
View File
@@ -47,6 +47,7 @@ model Tenant {
cmppConnectionStates CmppConnectionState[]
gatewayDownstreamRecoveryStatuses GatewayDownstreamRecoveryStatus[]
gatewaySubmitDeadLetters GatewaySubmitDeadLetter[]
smsReceiptAnomalies SmsReceiptAnomaly[]
openApiRequests OpenApiRequest[]
httpWebhookEvents HttpWebhookEvent[]
cmppInboundLongMessages CmppInboundLongMessage[]
@@ -453,6 +454,7 @@ model SmsApplication {
connectionStates CmppConnectionState[]
gatewayDownstreamRecoveryStatuses GatewayDownstreamRecoveryStatus[]
gatewaySubmitDeadLetters GatewaySubmitDeadLetter[]
receiptAnomalies SmsReceiptAnomaly[]
httpConfig SmsApplicationHttpConfig?
httpIpAllowlist SmsApplicationHttpIpAllowlist[]
httpApiCredentials HttpApiCredential[]
@@ -834,6 +836,7 @@ model SmsChannel {
uplinkMessages SmsUplinkMessage[]
connectionStates CmppConnectionState[]
gatewaySubmitDeadLetters GatewaySubmitDeadLetter[]
receiptAnomalies SmsReceiptAnomaly[]
@@index([status])
@@index([status, createdAt])
@@ -1559,6 +1562,7 @@ model SmsMessageRecord {
submitRecords SmsSubmitRecord[]
receiptRecords SmsReceiptRecord[]
segmentAudits SmsMessageSegmentAudit[]
receiptAnomalies SmsReceiptAnomaly[]
matchedUplinks SmsUplinkMessage[] @relation("SmsUplinkMatchedMessage")
uplinkMatchCandidates SmsUplinkMatchCandidate[]
downstreamDeliveries CmppDownstreamDelivery[]
@@ -1622,6 +1626,7 @@ model SmsSubmitRecord {
retryOfSubmitRecord SmsSubmitRecord? @relation("SmsSubmitRetry", fields: [retryOfSubmitRecordId], references: [id])
retrySubmit SmsSubmitRecord? @relation("SmsSubmitRetry")
segmentAudits SmsMessageSegmentAudit[]
receiptAnomalies SmsReceiptAnomaly[]
@@index([tenantId, createdAt])
@@index([messageRecordId])
@@ -1812,10 +1817,11 @@ model SmsReceiptRecord {
deliveredAt DateTime
createdAt DateTime @default(now())
tenant Tenant? @relation(fields: [tenantId], references: [id])
batchTask SmsBatchTask? @relation(fields: [batchTaskId], references: [id])
messageRecord SmsMessageRecord? @relation(fields: [messageRecordId], references: [id])
channel SmsChannel? @relation(fields: [channelId], references: [id])
tenant Tenant? @relation(fields: [tenantId], references: [id])
batchTask SmsBatchTask? @relation(fields: [batchTaskId], references: [id])
messageRecord SmsMessageRecord? @relation(fields: [messageRecordId], references: [id])
channel SmsChannel? @relation(fields: [channelId], references: [id])
anomalies SmsReceiptAnomaly[]
@@index([tenantId, createdAt])
@@index([messageId])
@@ -1824,6 +1830,47 @@ model SmsReceiptRecord {
@@index([channelId, gatewayMessageId, phoneNumber])
}
model SmsReceiptAnomaly {
id String @id @default(cuid())
anomalyKey String @unique
tenantId String?
applicationId String?
channelId String?
messageRecordId String?
submitRecordId String?
receiptRecordId String?
anomalyType String
status String @default("pending")
previousStatus String?
incomingStatus String?
rawStatus String?
errorCode String?
detail Json?
occurrenceCount Int @default(1)
firstOccurredAt DateTime @default(now())
lastOccurredAt DateTime @default(now())
resolvedAt DateTime?
resolutionNote String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: SetNull)
application SmsApplication? @relation(fields: [applicationId], references: [id], onDelete: SetNull)
channel SmsChannel? @relation(fields: [channelId], references: [id], onDelete: SetNull)
messageRecord SmsMessageRecord? @relation(fields: [messageRecordId], references: [id], onDelete: SetNull)
submitRecord SmsSubmitRecord? @relation(fields: [submitRecordId], references: [id], onDelete: SetNull)
receiptRecord SmsReceiptRecord? @relation(fields: [receiptRecordId], references: [id], onDelete: SetNull)
@@index([status, lastOccurredAt])
@@index([lastOccurredAt])
@@index([anomalyType, lastOccurredAt])
@@index([tenantId, status, lastOccurredAt])
@@index([applicationId, status, lastOccurredAt])
@@index([channelId, status, lastOccurredAt])
@@index([messageRecordId])
@@index([submitRecordId])
}
model SmsUplinkMessage {
id String @id @default(cuid())
tenantId String?