package whatsapp

import (
	"context"

	"github.com/zeromicro/go-zero/core/logx"
	"wechat-api/internal/svc"
	"wechat-api/internal/types"
)

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

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

func (l *UpdateWhatsappLogic) UpdateWhatsapp(req *types.WhatsappPhoneInfo) (*types.BaseMsgResp, error) {
	resp := types.BaseMsgResp{}

	//err := l.svcCtx.DB.Whatsapp.Update().Where().
	//	SetNotNilWaID(req.WaId).
	//	SetNotNilCallback(req.Callback).
	//	SetNotNilAccount(req.Account).
	//	SetNotNilPhone(req.Phone).
	//	SetNotNilCc(req.Cc).
	//	SetNotNilPhoneName(req.PhoneName).
	//	SetNotNilPhoneStatus(req.PhoneStatus).
	//	SetNotNilOrganizationID(req.OrganizationId).
	//	Exec(l.ctx)

	return &resp, nil
}
