package complete

import (
	"context"

	"github.com/zeromicro/go-zero/core/logx"
	"sundynix-micro-go/app/plant/api/internal/svc"
	"sundynix-micro-go/app/plant/api/internal/types"
	plantPb "sundynix-micro-go/app/plant/rpc/plant"
)

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

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

func (l *GetWikiClassDetailLogic) GetWikiClassDetail(req *types.IdPathReq) (*plantPb.WikiClassInfo, error) {
	return l.svcCtx.PlantRpc.GetWikiClassDetail(l.ctx, &plantPb.IdReq{Id: req.Id})
}
