import { HTTPBody } from '@fastify-modular/route'; import { pito } from 'pito'; import { NeedLogin } from '../defines'; // ========================================================================== export const CreateProductMatchByOwnerParam = pito.Obj({ prodId: pito.Num(), }); export type CreateProductMatchByOwnerParam = pito.Type; // ========================================================================== export const CreateProductMatchByOwnerInput = pito.Obj({}); export type CreateProductMatchByOwnerInput = pito.Type; // ========================================================================== export const CreateProductMatchByOwnerOption = pito.Obj({ userId: pito.Num(), }); export type CreateProductMatchByOwnerOption = pito.Type; // ========================================================================== export const CreateProductMatchByOwnerOutput = pito.Obj({}); export type CreateProductMatchByOwnerOutput = pito.Type; // ========================================================================== export const CreateProductMatchByOwner = HTTPBody('POST', '/api/v1/product/product-match/owner/:prodId', 'product') .params(CreateProductMatchByOwnerParam) .body(CreateProductMatchByOwnerInput) .query(CreateProductMatchByOwnerOption) .response(CreateProductMatchByOwnerOutput) .presets(NeedLogin) .build(); // ==========================================================================