refactor backend packages and global db service
This commit is contained in:
16
backend/internal/models/ai_key.go
Normal file
16
backend/internal/models/ai_key.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type SenlinAgentAIKey struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
UserID uint `gorm:"uniqueIndex;not null"`
|
||||
Provider string `gorm:"not null"`
|
||||
EncryptedAPIKey string `gorm:"not null"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (SenlinAgentAIKey) TableName() string {
|
||||
return "senlin_agent_ai_keys"
|
||||
}
|
||||
Reference in New Issue
Block a user