feat: 支持消费者按实物点击生成天河链存证证书
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
ALTER TABLE `blockchain_proof`
|
||||
ADD COLUMN `certificate_state` VARCHAR(20) NOT NULL DEFAULT 'NONE',
|
||||
ADD COLUMN `certificate_request` JSON NULL,
|
||||
ADD COLUMN `certificate_url` TEXT NULL,
|
||||
ADD COLUMN `certificate_error` TEXT NULL,
|
||||
ADD COLUMN `certificate_attempts` INTEGER NOT NULL DEFAULT 0,
|
||||
ADD COLUMN `certificate_next_check` DATETIME(3) NULL,
|
||||
ADD COLUMN `certificate_lease_until` DATETIME(3) NULL,
|
||||
ADD COLUMN `certificate_lease_token` VARCHAR(36) NULL,
|
||||
ADD COLUMN `certificate_requested_at` DATETIME(3) NULL,
|
||||
ADD COLUMN `certificate_generated_at` DATETIME(3) NULL;
|
||||
CREATE INDEX `blockchain_proof_certificate_state_certificate_next_check_idx`
|
||||
ON `blockchain_proof` (`certificate_state`, `certificate_next_check`);
|
||||
@@ -391,6 +391,17 @@ model BlockchainProof {
|
||||
failureReason String? @map("failure_reason") @db.Text
|
||||
lastSyncedAt DateTime? @map("last_synced_at")
|
||||
rawResponse Json? @map("raw_response")
|
||||
// Consumer-requested V3 certificate; separate from the NFT mint transaction.
|
||||
certificateState String @default("NONE") @map("certificate_state") @db.VarChar(20)
|
||||
certificateRequest Json? @map("certificate_request")
|
||||
certificateUrl String? @map("certificate_url") @db.Text
|
||||
certificateError String? @map("certificate_error") @db.Text
|
||||
certificateAttempts Int @default(0) @map("certificate_attempts")
|
||||
certificateNextCheck DateTime? @map("certificate_next_check")
|
||||
certificateLeaseUntil DateTime? @map("certificate_lease_until")
|
||||
certificateLeaseToken String? @map("certificate_lease_token") @db.VarChar(36)
|
||||
certificateRequestedAt DateTime? @map("certificate_requested_at")
|
||||
certificateGeneratedAt DateTime? @map("certificate_generated_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@ -399,6 +410,7 @@ model BlockchainProof {
|
||||
jobItems JobItem[]
|
||||
|
||||
@@unique([traceCodeId])
|
||||
@@index([certificateState, certificateNextCheck])
|
||||
@@index([status])
|
||||
@@index([onchainChunkId])
|
||||
@@map("blockchain_proof")
|
||||
|
||||
Reference in New Issue
Block a user