import { HTTPBody } from "@fastify-modular/route"; import { pito } from "pito"; import { NeedLogin } from "../defines"; // ========================================================================== export const SendBrokerageFeeParam = pito.Obj({ dealId: pito.Num(), }); export type SendBrokerageFeeParam = pito.Type; // ========================================================================== export const SendBrokerageFeeInput = pito.Obj({ price: pito.Num(), // 납부금액 }); export type SendBrokerageFeeInput = pito.Type; // ========================================================================== export const SendBrokerageFeeOption = pito.Obj({}); export type SendBrokerageFeeOption = pito.Type; // ========================================================================== export const SendBrokerageFeeOutput = pito.Obj({ pmntId : pito.UUID(), expiredAt: pito.Datetime(), }); export type SendBrokerageFeeOutput = pito.Type; // ========================================================================== export const SendBrokerageFee = HTTPBody( "POST", "/api/v1/product/deal/brokerage-fee/send/:dealId", "deal" ) .params(SendBrokerageFeeParam) .body(SendBrokerageFeeInput) .query(SendBrokerageFeeOption) .response(SendBrokerageFeeOutput) .presets(NeedLogin) .build(); // ==========================================================================