package com.red.circle.other.app.inner.endpoint.material.props;

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.app.inner.service.material.props.PropsRunningWaterClientService;
import com.red.circle.other.inner.endpoint.material.props.api.PropsRunningWaterClientApi;
import com.red.circle.other.inner.model.cmd.material.RunningWaterUserPropsQryCmd;
import com.red.circle.other.inner.model.dto.material.RunningWaterUserPropsDTO;
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 pengliang on 2023/11/7
 */
@Validated
@RestController
@RequestMapping(value = PropsRunningWaterClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class PropsRunningWaterClientEndpoint implements PropsRunningWaterClientApi {

  private final PropsRunningWaterClientService propsRunningWaterClientService;

  @Override
  public ResultResponse<PageResult<RunningWaterUserPropsDTO>> pageRunningWaterOps(
      RunningWaterUserPropsQryCmd qryCmd) {
    return ResultResponse.success(propsRunningWaterClientService.pageRunningWaterOps(qryCmd));
  }

}
