- 로그인 화면 기능 로직 1차 구현 중
This commit is contained in:
@@ -3,7 +3,7 @@ import * as z from 'zod';
|
||||
export const EmailVerificationSchema = z.object({
|
||||
email: z
|
||||
.email()
|
||||
, verificationCode: z
|
||||
, code: z
|
||||
.string()
|
||||
.length(6, "이메일 인증 번호 6자리를 입력해주십시오.")
|
||||
});
|
||||
@@ -1,9 +1,8 @@
|
||||
import * as z from 'zod';
|
||||
|
||||
export const LoginSchema = z.object({
|
||||
email: z
|
||||
.email()
|
||||
.min(1, "이메일을 입력해주십시오.")
|
||||
id: z
|
||||
.string()
|
||||
, password: z
|
||||
.string()
|
||||
.min(8, "비밀번호는 8-12 자리여야 합니다.")
|
||||
|
||||
@@ -3,7 +3,4 @@ import * as z from 'zod';
|
||||
export const ResetPasswordSchema = z.object({
|
||||
email: z
|
||||
.email()
|
||||
, resetCode: z
|
||||
.string()
|
||||
.length(6)
|
||||
});
|
||||
@@ -1,9 +1,12 @@
|
||||
import * as z from 'zod';
|
||||
|
||||
export const SignUpSchema = z.object({
|
||||
email: z
|
||||
accountId: z
|
||||
.string()
|
||||
.min(1, "이메일을 입력해주십시오.")
|
||||
.min(5, "아이디는 5 자리 이상이어야 합니다.")
|
||||
, email: z
|
||||
.string()
|
||||
.min(5, "이메일을 입력해주십시오.")
|
||||
, password: z
|
||||
.string()
|
||||
.min(8, "비밀번호는 8-12 자리여야 합니다.")
|
||||
|
||||
9
src/data/request/account/CheckDuplicationRequest.ts
Normal file
9
src/data/request/account/CheckDuplicationRequest.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class CheckDuplicationRequest {
|
||||
type: 'email' | 'accountId';
|
||||
value: string;
|
||||
|
||||
constructor(type: 'email' | 'accountId', value: string) {
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
15
src/data/request/account/LoginRequest.ts
Normal file
15
src/data/request/account/LoginRequest.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export class LoginRequest {
|
||||
type: 'email' | 'accountId';
|
||||
id: string;
|
||||
password: string;
|
||||
|
||||
constructor(
|
||||
type: 'email' | 'accountId',
|
||||
id: string,
|
||||
password: string
|
||||
) {
|
||||
this.type = type;
|
||||
this.id = id;
|
||||
this.password = password;
|
||||
}
|
||||
}
|
||||
7
src/data/request/account/SendVerificationCodeRequest.ts
Normal file
7
src/data/request/account/SendVerificationCodeRequest.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export class SendVerificationCodeRequest {
|
||||
email: string;
|
||||
|
||||
constructor(email: string) {
|
||||
this.email = email;
|
||||
}
|
||||
}
|
||||
15
src/data/request/account/SignupRequest.ts
Normal file
15
src/data/request/account/SignupRequest.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export class SignupRequest {
|
||||
accountId: string;
|
||||
email: string;
|
||||
name: string;
|
||||
nickname: string;
|
||||
password: string;
|
||||
|
||||
constructor(accountId: string, email: string, name: string, nickname: string, password: string) {
|
||||
this.accountId = accountId;
|
||||
this.email = email;
|
||||
this.name = name;
|
||||
this.nickname = nickname;
|
||||
this.password = password;
|
||||
}
|
||||
}
|
||||
9
src/data/request/account/VerifyCodeRequest.ts
Normal file
9
src/data/request/account/VerifyCodeRequest.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class VerifyCodeRequest {
|
||||
email: string;
|
||||
code: string;
|
||||
|
||||
constructor(email: string, code: string) {
|
||||
this.email = email;
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
5
src/data/request/index.ts
Normal file
5
src/data/request/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export * from './account/CheckDuplicationRequest';
|
||||
export * from './account/SendVerificationCodeRequest';
|
||||
export * from './account/VerifyCodeRequest';
|
||||
export * from './account/SignupRequest';
|
||||
export * from './account/LoginRequest';
|
||||
4
src/data/response/BaseResponse.ts
Normal file
4
src/data/response/BaseResponse.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export class BaseResponse {
|
||||
message?: string;
|
||||
error?: string;
|
||||
}
|
||||
5
src/data/response/account/CheckDuplicationResponse.ts
Normal file
5
src/data/response/account/CheckDuplicationResponse.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { BaseResponse } from "../BaseResponse";
|
||||
|
||||
export class CheckDuplicationResponse extends BaseResponse{
|
||||
isDuplicated!: boolean;
|
||||
}
|
||||
5
src/data/response/account/LoginResponse.ts
Normal file
5
src/data/response/account/LoginResponse.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { BaseResponse } from "../BaseResponse";
|
||||
|
||||
export class LoginResponse extends BaseResponse {
|
||||
success!: boolean;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { BaseResponse } from "../BaseResponse";
|
||||
|
||||
export class SendVerificationCodeResponse extends BaseResponse {
|
||||
success!: boolean;
|
||||
}
|
||||
6
src/data/response/account/SignupResponse.ts
Normal file
6
src/data/response/account/SignupResponse.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { BaseResponse } from "../BaseResponse";
|
||||
|
||||
export class SignupResponse extends BaseResponse {
|
||||
success!: boolean;
|
||||
|
||||
}
|
||||
5
src/data/response/account/VerifyCodeResponse.ts
Normal file
5
src/data/response/account/VerifyCodeResponse.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { BaseResponse } from "../BaseResponse";
|
||||
|
||||
export class VerifyCodeResponse extends BaseResponse {
|
||||
verified!: boolean;
|
||||
}
|
||||
5
src/data/response/index.ts
Normal file
5
src/data/response/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export * from './account/CheckDuplicationResponse';
|
||||
export * from './account/SendVerificationCodeResponse';
|
||||
export * from './account/VerifyCodeResponse';
|
||||
export * from './account/SignupResponse';
|
||||
export * from './account/LoginResponse';
|
||||
Reference in New Issue
Block a user