package cloud

import (
	"context"
	"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
	"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"

	"github.com/zeromicro/go-zero/core/logx"
)

type GetClusterListLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

func NewGetClusterListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetClusterListLogic {
	return &GetClusterListLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (l *GetClusterListLogic) GetClusterList(req *types.GetClusterListReq) (resp *types.GetClusterListResp, err error) {
	resp = &types.GetClusterListResp{}
	//clusters := []models.ScParticipantPhyInfo{}
	l.svcCtx.DbEngin.Find(resp.Clusters).Where("id", req.Id)
	return resp, nil
}
