Skip to content

Commit

Permalink
➕[ADD] 요청 바디 관련 파일 추가(#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
heerucan committed Nov 12, 2021
1 parent 31b45b2 commit 161f74f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@

import Foundation

/**
로그인 및 회원가입 시 필요한 정보들을 반환하는 데이터 모델입니다.
*/

// MARK: - AuthModel

struct AuthModel: Codable {
let status: Int
let success: Bool
let message: String
let data: AuthInfo?
let data: AuthData?
}

// MARK: - AuthInfo

struct AuthInfo: Codable {
struct AuthData: Codable {
let id: Int
let name, email: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,18 @@
//

import Foundation

/**
로그인 시 사용하는 데이터 요청 바디입니다
*/

struct LoginRequest: Codable {
var email: String
var password: String

init(_ email: String, _ password: String) {
self.email = email
self.password = password
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@
//

import Foundation

/**
회원가입 시 사용하는 데이터 요청 바디입니다
*/

struct SignUpRequest: Codable {
var email: String
var name: String
var password: String

init(_ email: String, _ name: String ,_ password: String) {
self.email = email
self.name = name
self.password = password
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
//

import Foundation

0 comments on commit 161f74f

Please sign in to comment.