package com.sckw.transport.controller;

import com.sckw.core.web.response.BaseResult;
import com.sckw.transport.model.param.ParkingWalletFeeEstimateQueryParam;
import com.sckw.transport.model.param.ParkingWalletFeeEstimateResp;
import com.sckw.transport.service.ParkingWalletFeeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
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: donglang
 * Time: 2026-06-25
 * Des: 服务费预估
 * Version: 1.0
 */
@RestController
@RequestMapping("/parking/wallet/fee")
@RequiredArgsConstructor
@Tag(name = "服务费预估接口", description = "服务费预估接口")
public class ParkingWalletFeeEstimateController {

    private final ParkingWalletFeeService parkingWalletFeeService;

    @Operation(summary = "查询服务费余额、本次预计服务费与最大可购买数量", description = "查询服务费余额、本次预计服务费与最大可购买数量")
    @PostMapping("/queryEstimate")
    public BaseResult<ParkingWalletFeeEstimateResp> queryEstimate(@RequestBody @Valid ParkingWalletFeeEstimateQueryParam param) {
        return BaseResult.success(parkingWalletFeeService.queryEstimateServiceFee(param));
    }
}
