import { HTTPBody } from '@fastify-modular/route'; import { pito } from 'pito'; import { AuthorityType, DepartmentType, DutyType, JobPositionType } from '../enums'; // =========================================================================================== export const RegisterAdminInput = pito.Obj({ nickName : pito.Str(), email : pito.Str(), phoneNumber : pito.Str({}), birth : pito.Date(), pw : pito.Str(), // authorityType : pito.Enums(AuthorityType), // 권한타입 departmentType : pito.Enums(DepartmentType), // 부서타입 jobPositionType: pito.Enums(JobPositionType), // 직급타입 dutyType : pito.Enums(DutyType), // 직책타입 // secret : pito.Str(), }); export type RegisterAdminInput = pito.Type; // =========================================================================================== export const RegisterAdminOutput = pito.Obj({ userId: pito.Int(), }); export type RegisterAdminOutput = pito.Type; // =========================================================================================== // API : [Experimental] // 회원가입용 API 입니다. export const RegisterAdmin = HTTPBody( 'POST', '/api/v1/auth/register/admin', 'auth', ) .body(RegisterAdminInput) .response(RegisterAdminOutput) .build(); // ===========================================================================================