From a4b7c245044812ef82095d386cece3630d11c0ca Mon Sep 17 00:00:00 2001 From: wizardchen Date: Mon, 12 Jan 2026 18:05:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20SeqID=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=80=92=E5=A2=9E=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/types/chunk.go | 2 +- internal/types/tag.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/types/chunk.go b/internal/types/chunk.go index fa3cf7ea..eb16a057 100644 --- a/internal/types/chunk.go +++ b/internal/types/chunk.go @@ -103,7 +103,7 @@ type Chunk struct { // Unique identifier of the chunk, using UUID format ID string `json:"id" gorm:"type:varchar(36);primaryKey"` // SeqID is an auto-increment integer ID for external API usage (FAQ entries) - SeqID int64 `json:"seq_id" gorm:"type:bigint;uniqueIndex"` + SeqID int64 `json:"seq_id" gorm:"type:bigint;uniqueIndex;autoIncrement"` // Tenant ID, used for multi-tenant isolation TenantID uint64 `json:"tenant_id"` // ID of the parent knowledge, associated with the Knowledge model diff --git a/internal/types/tag.go b/internal/types/tag.go index 778f6bc8..55c3da38 100644 --- a/internal/types/tag.go +++ b/internal/types/tag.go @@ -9,7 +9,7 @@ type KnowledgeTag struct { // Unique identifier of the tag (UUID) ID string `json:"id" gorm:"type:varchar(36);primaryKey"` // SeqID is an auto-increment integer ID for external API usage - SeqID int64 `json:"seq_id" gorm:"type:bigint;uniqueIndex"` + SeqID int64 `json:"seq_id" gorm:"type:bigint;uniqueIndex;autoIncrement"` // Tenant ID TenantID uint64 `json:"tenant_id"` // Knowledge base ID that this tag belongs to