Files
geekai/api/store/model/function.go
T
RockYang b18b8ccb02 release: v4.2.8
整合开源版 v4.2.8 功能:Sora2 视频、路由重构、手机站开关、DALL-E 参考图,以及启动时自动同步数据表字段等修复与优化。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 11:12:37 +08:00

18 lines
1.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
type Function struct {
Id uint `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
Name string `gorm:"column:name;type:varchar(30);uniqueIndex;not null;comment:函数名称" json:"name"`
Label string `gorm:"column:label;type:varchar(30);comment:函数标签" json:"label"`
Description string `gorm:"column:description;type:varchar(255);comment:函数描述" json:"description"`
Parameters string `gorm:"column:parameters;type:text;comment:函数参数(JSON" json:"parameters"`
Token string `gorm:"column:token;type:varchar(255);comment:API授权token" json:"token"`
Action string `gorm:"column:action;type:varchar(255);comment:函数处理 API" json:"action"`
Enabled bool `gorm:"column:enabled;type:tinyint(1);not null;default:0;comment:是否启用" json:"enabled"`
Power int `gorm:"column:power;type:int(11);not null;default:0;comment:消费算力点数" json:"power"`
}
func (m *Function) TableName() string {
return "geekai_functions"
}