modified storage implementations

Former-commit-id: 06cbd0eae64d3b1bf3d8e1bf1d4296a98a4d4898
This commit is contained in:
tzwang 2024-02-01 17:27:18 +08:00
parent 41c93839f9
commit 41474ecaff
2 changed files with 18 additions and 2 deletions

View File

@ -1,8 +1,19 @@
package database
import (
"github.com/zeromicro/go-zero/core/logx"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types"
"gorm.io/gorm"
)
type AiStorage struct {
DbEngin *gorm.DB
}
func (s *AiStorage) getParticipants() {
func (s *AiStorage) GetParticipants() {
var resp types.ClusterListResp
tx := s.DbEngin.Raw("select * from t_cluster where `deleted_at` IS NULL ORDER BY create_time Desc").Scan(&resp.Data)
if tx.Error != nil {
logx.Errorf(tx.Error.Error())
}
}

View File

@ -0,0 +1,5 @@
package option
type Option struct {
Name string
}