package logic

import (
	"context"

	"juwan-backend/app/user_verifications/rpc/internal/svc"
	"juwan-backend/app/user_verifications/rpc/pb"

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

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

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

func (l *DelUserVerificationsLogic) DelUserVerifications(in *pb.DelUserVerificationsReq) (*pb.DelUserVerificationsResp, error) {
	// todo: add your logic here and delete this line
	err := l.svcCtx.UserVeriModelRW.DeleteOneID(in.Id).Exec(l.ctx)
	if err != nil {
		return nil, err
	}
	return &pb.DelUserVerificationsResp{}, nil
}
