package operationRecord

import (
	"context"
	"github.com/zeromicro/go-zero/core/logx"
	"sundynix-micro-go/app/system/api/internal/svc"
	"sundynix-micro-go/app/system/api/internal/types"
	"sundynix-micro-go/app/system/rpc/system"
)

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

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

func (l *DeleteOperationRecordLogic) DeleteOperationRecord(req *types.IdsReq) error {
	_, err := l.svcCtx.SystemRpc.DeleteOperationRecord(l.ctx, &system.IdsReq{Ids: req.Ids})
	return err
}
