package card_info_c_trip

import (
	"context"
	"kami/api/commonApi"
	"kami/internal/model"
	"kami/internal/service"

	"kami/api/card_info_c_trip/v1"
)

func (c *ControllerV1) AccountUpdate(ctx context.Context, req *v1.AccountUpdateReq) (res *v1.AccountUpdateRes, err error) {
	redeemAccountService := service.CardRedeemAccount()
	err = redeemAccountService.Update(ctx, &model.RedeemAccountUpdateInput{
		CommonStrId: commonApi.CommonStrId{
			ID: req.ID,
		},
		Status:         req.Status,
		Name:           req.Name,
		Remark:         req.Remark,
		MaxAmountLimit: req.MaxAmountLimit,
		MaxCountLimit:  req.MaxAmountLimit,
	}, nil)
	return
}
