feat: 添加 SeqID 自动递增标签

This commit is contained in:
wizardchen
2026-01-12 18:05:27 +08:00
parent 6c9d31496f
commit a4b7c24504
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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