package com.red.circle.other.app.inner.endpoint.approval;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.app.inner.service.approval.ApprovalDataInfoClientService;
import com.red.circle.other.inner.endpoint.dynamic.api.ApprovalDataInfoClientApi;
import com.red.circle.other.inner.model.cmd.approval.ApprovalDateInfoCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 资料审批
 *
 * @author zongpubin on 2024/1/22
 */
@Validated
@RestController
@RequestMapping(value = ApprovalDataInfoClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class ApprovalDataInfoClientEndpoint implements ApprovalDataInfoClientApi {

  private final ApprovalDataInfoClientService approvalDataInfoClientService;

  @Override
  public ResultResponse<Void> approval(ApprovalDateInfoCmd cmd) {
    approvalDataInfoClientService.approval(cmd);
    return ResultResponse.success();
  }
}
