package wiki

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 DeleteWikiClassLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

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

func (l *DeleteWikiClassLogic) DeleteWikiClass(req *types.IdsReq) error {
	_, err := l.svcCtx.PlantRpc.DeleteWikiClass(l.ctx, &plantPb.IdsReq{Ids: req.Ids})
	return err
}
