feat(ai): add local expert library
This commit is contained in:
26
backend/internal/models/ai_expert.go
Normal file
26
backend/internal/models/ai_expert.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// SenlinAgentAIExpert 是本地专家库中的可选 AI 角色。
|
||||
type SenlinAgentAIExpert struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Identity string `gorm:"type:char(36);uniqueIndex"`
|
||||
Slug string `gorm:"size:160;uniqueIndex;not null"`
|
||||
Category string `gorm:"size:80;index;not null"`
|
||||
CategoryName string `gorm:"size:120;not null"`
|
||||
Name string `gorm:"size:160;index;not null"`
|
||||
Description string `gorm:"type:text;not null"`
|
||||
Emoji string `gorm:"size:32"`
|
||||
Color string `gorm:"size:32"`
|
||||
SystemPrompt string `gorm:"type:text;not null"`
|
||||
Source string `gorm:"size:255;not null"`
|
||||
SourceLicense string `gorm:"size:32;not null"`
|
||||
Enabled bool `gorm:"not null;default:true;index"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (SenlinAgentAIExpert) TableName() string {
|
||||
return "senlin_agent_ai_experts"
|
||||
}
|
||||
Reference in New Issue
Block a user