feat: 天河链升级为存证+发行(NFT)双层,新增轮换 UserKey 与 C 端 tokenId 展示
- 上链流程:upload 存证 → publish 铸 NFT → 接口9确认 mint → ONCHAIN,记录 tokenId/合约地址 - blockchain_proof 加 token_id/contract_address 字段(迁移),schema 补 VarChar 注解消除 drift - TianheProvider 新增 publish/updateUserKey;合约地址与 maxTokenId 存系统设置维护 baseTokenId - 轮换 UserKey:接口7 + 设置页「轮换密钥」(二次确认+回显强提示+操作日志) - C 端区块链卡展示数字藏品编号(tokenId)与合约地址 - 测试环境全链路实测通过;媒体上链层级待甲方确认,暂维持 JSON 存证 - docs/天河链文档.md 标注以 APIFox 为准并列勘误
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- 存证+发行模式:记录铸造的 NFT TokenId 与合约地址
|
||||
ALTER TABLE `blockchain_proof`
|
||||
ADD COLUMN `token_id` BIGINT NULL,
|
||||
ADD COLUMN `contract_address` VARCHAR(191) NULL;
|
||||
@@ -344,18 +344,20 @@ model TraceCodeDailySequence {
|
||||
}
|
||||
|
||||
model BlockchainProof {
|
||||
id Int @id @default(autoincrement())
|
||||
traceCodeId BigInt @map("trace_code_id")
|
||||
dataHash String @map("data_hash")
|
||||
txHash String? @map("tx_hash")
|
||||
blockHash String? @map("block_hash")
|
||||
blockHeight BigInt? @map("block_height")
|
||||
chainName String? @map("chain_name")
|
||||
explorerUrl String? @map("explorer_url")
|
||||
onchainAt DateTime? @map("onchain_at")
|
||||
status ProofStatus @default(PENDING)
|
||||
rawResponse Json? @map("raw_response")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
id Int @id @default(autoincrement())
|
||||
traceCodeId BigInt @map("trace_code_id")
|
||||
dataHash String @map("data_hash")
|
||||
txHash String? @map("tx_hash")
|
||||
blockHash String? @map("block_hash")
|
||||
blockHeight BigInt? @map("block_height")
|
||||
chainName String? @map("chain_name")
|
||||
explorerUrl String? @map("explorer_url")
|
||||
tokenId BigInt? @map("token_id")
|
||||
contractAddress String? @map("contract_address")
|
||||
onchainAt DateTime? @map("onchain_at")
|
||||
status ProofStatus @default(PENDING)
|
||||
rawResponse Json? @map("raw_response")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
traceCode TraceCode @relation(fields: [traceCodeId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@ -415,7 +417,7 @@ model OperationLog {
|
||||
module String
|
||||
action String
|
||||
method String
|
||||
path String
|
||||
path String @db.VarChar(512)
|
||||
targetId String? @map("target_id")
|
||||
status String
|
||||
message String? @db.Text
|
||||
@@ -439,7 +441,7 @@ model OutboundImportSession {
|
||||
id String @id @default(cuid())
|
||||
status OutboundImportSessionStatus @default(PARSING)
|
||||
fileName String @map("file_name")
|
||||
fileKey String? @map("file_key")
|
||||
fileKey String? @map("file_key") @db.VarChar(512)
|
||||
total Int @default(0)
|
||||
validCount Int @default(0) @map("valid_count")
|
||||
invalidCount Int @default(0) @map("invalid_count")
|
||||
@@ -488,7 +490,7 @@ model OutboundImportRow {
|
||||
model BackupRecord {
|
||||
id String @id @default(cuid())
|
||||
fileName String @map("file_name")
|
||||
filePath String @map("file_path")
|
||||
filePath String @map("file_path") @db.VarChar(1024)
|
||||
size BigInt @default(0)
|
||||
status BackupStatus @default(PENDING)
|
||||
mode String @default("BACKUP")
|
||||
|
||||
Reference in New Issue
Block a user