import { HTTPBody } from '@fastify-modular/route'; import { pito } from 'pito'; import { NeedLogin } from '../defines'; // ========================================================================== export const SendDownParam = pito.Obj({ dealId: pito.Num(), }); export type SendDownParam = pito.Type; // ========================================================================== export const SendDownInput = pito.Obj({ price: pito.Num(), // 납부금액 }); export type SendDownInput = pito.Type; // ========================================================================== export const SendDownOutput = pito.Obj({ pmntId : pito.UUID(), expiredAt: pito.Datetime(), }); export type SendDownOutput = pito.Type; // ========================================================================== export const SendDown = HTTPBody('POST', '/api/v1/product/deal/down/send/:dealId', 'deal') .params(SendDownParam) .body(SendDownInput) .response(SendDownOutput) .presets(NeedLogin) .build(); // ==========================================================================