package com.ningdatech.pmapi.sms.controller;

import com.ningdatech.pmapi.sms.constant.VerificationCodeType;
import com.ningdatech.pmapi.sms.manage.SmsManage;
import com.ningdatech.pmapi.sms.model.po.ReqVerificationCodePO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuxinxin
 * @date 2023/2/16 下午4:40
 */
@Slf4j
@RestController
@RequestMapping("/api/v1/verification")
@Api(tags = "验证码相关接口")
@RequiredArgsConstructor
public class VerificationCodeController {


    private final SmsManage smsManage;

    /**
     * 通用的发送验证码功能
     * 一个系统可能有很多地方需要发送验证码（注册、找回密码等）
     * 每增加一个场景{@link VerificationCodeType}就需要增加一个枚举值
     */
    @ApiOperation(value = "发送验证码", notes = "发送验证码")
    @PostMapping(value = "/send")
    public void send(@Validated @RequestBody ReqVerificationCodePO request) {
//        smsManage.sendVerificationCode(request);
    }

}
