generated from GSM-MSG/MSG-Repository-Generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #230 from School-of-Company/feature/228-apply-moshi
🔀 :: (#228) - Moshi 라이브러리 직렬화를 사용하여 Gson의 단점을 보완하였습니다
- Loading branch information
Showing
42 changed files
with
380 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
core/network/src/main/java/com/msg/network/request/admin/GetUserListRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package com.msg.network.request.admin | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class GetUserListRequest( | ||
val keyword: String, | ||
val page: Int, | ||
val size: Int, | ||
val sort: String, | ||
@Json(name = "keyword") val keyword: String, | ||
@Json(name = "page") val page: Int, | ||
@Json(name = "size") val size: Int, | ||
@Json(name = "sort") val sort: String, | ||
) |
8 changes: 6 additions & 2 deletions
8
core/network/src/main/java/com/msg/network/request/auth/FindPasswordRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
package com.msg.network.request.auth | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class FindPasswordRequest( | ||
val email: String, | ||
val newPassword: String, // 8 ~ 24 영어(대문자 소문자 상관 X) + 숫자 + 특수 문자(여러 개도 상관 X) | ||
@Json(name = "email") val email: String, | ||
@Json(name = "newPassword") val newPassword: String, // 8 ~ 24 영어(대문자 소문자 상관 X) + 숫자 + 특수 문자(여러 개도 상관 X) | ||
) |
8 changes: 6 additions & 2 deletions
8
core/network/src/main/java/com/msg/network/request/auth/LoginRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
package com.msg.network.request.auth | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class LoginRequest( | ||
val email: String, | ||
val password: String | ||
@Json(name = "email") val email: String, | ||
@Json(name = "password") val password: String, | ||
) |
15 changes: 9 additions & 6 deletions
15
core/network/src/main/java/com/msg/network/request/auth/SignUpBbozzakTeacherRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
package com.msg.network.request.auth | ||
|
||
import com.msg.model.enumdata.HighSchool | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class SignUpBbozzakTeacherRequest( | ||
val email: String, | ||
val name: String, | ||
val phoneNumber: String, | ||
val password: String, | ||
val highSchool: HighSchool, | ||
val clubName: String | ||
@Json(name = "email") val email: String, | ||
@Json(name = "name")val name: String, | ||
@Json(name = "phoneNumber") val phoneNumber: String, | ||
@Json(name = "password") val password: String, | ||
@Json(name = "highSchool") val highSchool: HighSchool, | ||
@Json(name = "clubName") val clubName: String, | ||
) |
17 changes: 10 additions & 7 deletions
17
core/network/src/main/java/com/msg/network/request/auth/SignUpCompanyInstructorRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package com.msg.network.request.auth | ||
|
||
import com.msg.model.enumdata.HighSchool | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class SignUpCompanyInstructorRequest( | ||
val email: String, | ||
val name: String, | ||
val phoneNumber: String, | ||
val password: String, | ||
val highSchool: HighSchool, | ||
val clubName: String, | ||
val company: String | ||
@Json(name = "email") val email: String, | ||
@Json(name = "name") val name: String, | ||
@Json(name = "phoneNumber") val phoneNumber: String, | ||
@Json(name = "password") val password: String, | ||
@Json(name = "highSchool") val highSchool: HighSchool, | ||
@Json(name = "clubName") val clubName: String, | ||
@Json(name = "company") val company: String, | ||
) |
21 changes: 12 additions & 9 deletions
21
core/network/src/main/java/com/msg/network/request/auth/SignUpGovernmentRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
package com.msg.network.request.auth | ||
|
||
import com.msg.model.enumdata.HighSchool | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class SignUpGovernmentRequest( | ||
val email: String, | ||
val name: String, | ||
val phoneNumber: String, | ||
val password: String, | ||
val highSchool: HighSchool, | ||
val clubName: String, | ||
val governmentName: String, | ||
val position: String, | ||
val sectors: String | ||
@Json(name = "email") val email: String, | ||
@Json(name = "name") val name: String, | ||
@Json(name = "phoneNumber") val phoneNumber: String, | ||
@Json(name = "password") val password: String, | ||
@Json(name = "highSchool") val highSchool: HighSchool, | ||
@Json(name = "clubName") val clubName: String, | ||
@Json(name = "governmentName") val governmentName: String, | ||
@Json(name = "position") val position: String, | ||
@Json(name = "sectors") val sectors: String, | ||
) |
15 changes: 9 additions & 6 deletions
15
core/network/src/main/java/com/msg/network/request/auth/SignUpJobClubTeacherRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
package com.msg.network.request.auth | ||
|
||
import com.msg.model.enumdata.HighSchool | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class SignUpJobClubTeacherRequest( | ||
val email: String, | ||
val name: String, | ||
val phoneNumber: String, | ||
val password: String, | ||
val highSchool: HighSchool, | ||
val clubName: String | ||
@Json(name = "email") val email: String, | ||
@Json(name = "name") val name: String, | ||
@Json(name = "phoneNumber") val phoneNumber: String, | ||
@Json(name = "password") val password: String, | ||
@Json(name = "highSchool") val highSchool: HighSchool, | ||
@Json(name = "clubName") val clubName: String, | ||
) |
17 changes: 10 additions & 7 deletions
17
core/network/src/main/java/com/msg/network/request/auth/SignUpProfessorRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package com.msg.network.request.auth | ||
|
||
import com.msg.model.enumdata.HighSchool | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class SignUpProfessorRequest( | ||
val email: String, | ||
val name: String, | ||
val phoneNumber: String, | ||
val password: String, | ||
val highSchool: HighSchool, | ||
val clubName: String, | ||
val university: String | ||
@Json(name = "email") val email: String, | ||
@Json(name = "name") val name: String, | ||
@Json(name = "phoneNumber") val phoneNumber: String, | ||
@Json(name = "password") val password: String, | ||
@Json(name = "highSchool") val highSchool: HighSchool, | ||
@Json(name = "clubName") val clubName: String, | ||
@Json(name = "university") val university: String, | ||
) |
25 changes: 14 additions & 11 deletions
25
core/network/src/main/java/com/msg/network/request/auth/SignUpStudentRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
package com.msg.network.request.auth | ||
|
||
import com.msg.model.enumdata.HighSchool | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
data class SignUpStudentRequest ( | ||
val email: String, | ||
val name: String, | ||
val phoneNumber: String, | ||
val password: String, | ||
val highSchool: HighSchool, | ||
val clubName: String, | ||
val grade: Int, | ||
val classRoom: Int, | ||
val number: Int, | ||
val admissionNumber: Int | ||
@JsonClass(generateAdapter = true) | ||
data class SignUpStudentRequest( | ||
@Json(name = "email") val email: String, | ||
@Json(name = "name") val name: String, | ||
@Json(name = "phoneNumber") val phoneNumber: String, | ||
@Json(name = "password") val password: String, | ||
@Json(name = "highSchool") val highSchool: HighSchool, | ||
@Json(name = "clubName") val clubName: String, | ||
@Json(name = "grade") val grade: Int, | ||
@Json(name = "classRoom") val classRoom: Int, | ||
@Json(name = "number") val number: Int, | ||
@Json(name = "admissionNumber") val admissionNumber: Int, | ||
) |
7 changes: 5 additions & 2 deletions
7
.../network/src/main/java/com/msg/network/request/certification/WriteCertificationRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
package com.msg.network.request.certification | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
import java.time.LocalDate | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class WriteCertificationRequest( | ||
val name: String, | ||
val acquisitionDate: LocalDate | ||
@Json(name = "name") val name: String, | ||
@Json(name = "acquisitionDate") val acquisitionDate: LocalDate, | ||
) |
6 changes: 5 additions & 1 deletion
6
core/network/src/main/java/com/msg/network/request/email/SendLinkToEmailRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
package com.msg.network.request.email | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class SendLinkToEmailRequest( | ||
val email: String, | ||
@Json(name = "email") val email: String, | ||
) |
8 changes: 6 additions & 2 deletions
8
core/network/src/main/java/com/msg/network/request/faq/AddFrequentlyAskedQuestionsRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
package com.msg.network.request.faq | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class AddFrequentlyAskedQuestionsRequest( | ||
val question: String, | ||
val answer: String, | ||
@Json(name = "question") val question: String, | ||
@Json(name = "answer") val answer: String, | ||
) |
32 changes: 17 additions & 15 deletions
32
core/network/src/main/java/com/msg/network/request/lecture/OpenLectureRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
package com.msg.network.request.lecture | ||
|
||
import com.msg.model.model.lecture.LectureDates | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
|
||
|
||
@JsonClass(generateAdapter = true) | ||
data class OpenLectureRequest( | ||
val name: String, | ||
val content: String, | ||
val semester: String, | ||
val division: String, | ||
val department: String, | ||
val line: String, | ||
val userId: UUID, | ||
val startDate: LocalDateTime, | ||
val endDate: LocalDateTime, | ||
val lectureDates: List<LectureDates>, | ||
val lectureType: String, | ||
val credit: Int, | ||
val maxRegisteredUser: Int, | ||
val essentialComplete: Boolean, | ||
@Json(name = "name") val name: String, | ||
@Json(name = "content") val content: String, | ||
@Json(name = "semester") val semester: String, | ||
@Json(name = "division") val division: String, | ||
@Json(name = "department") val department: String, | ||
@Json(name = "line") val line: String, | ||
@Json(name = "userId") val userId: UUID, | ||
@Json(name = "startDate") val startDate: LocalDateTime, | ||
@Json(name = "endDate") val endDate: LocalDateTime, | ||
@Json(name = "lectureDates") val lectureDates: List<LectureDates>, | ||
@Json(name = "lectureType") val lectureType: String, | ||
@Json(name = "credit") val credit: Int, | ||
@Json(name = "maxRegisteredUser") val maxRegisteredUser: Int, | ||
@Json(name = "essentialComplete") val essentialComplete: Boolean, | ||
) |
11 changes: 7 additions & 4 deletions
11
core/network/src/main/java/com/msg/network/request/post/WritePostRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
package com.msg.network.request.post | ||
|
||
import com.msg.model.enumdata.FeedType | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class WritePostRequest( | ||
val title: String, | ||
val content: String, | ||
val links: List<String>, | ||
val feedType: FeedType | ||
@Json(name = "title") val title: String, | ||
@Json(name = "content") val content: String, | ||
@Json(name = "links") val links: List<String>, | ||
@Json(name = "feedType") val feedType: FeedType, | ||
) |
8 changes: 6 additions & 2 deletions
8
core/network/src/main/java/com/msg/network/request/user/ChangePasswordRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
package com.msg.network.request.user | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class ChangePasswordRequest( | ||
val currentPassword: String, | ||
val newPassword: String | ||
@Json(name = "currentPassword") val currentPassword: String, | ||
@Json(name = "newPassword") val newPassword: String, | ||
) |
17 changes: 10 additions & 7 deletions
17
...k/src/main/java/com/msg/network/response/activity/GetDetailStudentActivityInfoResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
package com.msg.network.response.activity | ||
|
||
import com.msg.model.enumdata.ApproveStatus | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
import java.time.LocalDate | ||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class GetDetailStudentActivityInfoResponse( | ||
val id: UUID, | ||
val title: String, | ||
val content: String, | ||
val credit: Int, | ||
val activityDate: LocalDate, | ||
val modifiedAt: LocalDateTime, | ||
val approveState: ApproveStatus | ||
@Json(name = "id") val id: UUID, | ||
@Json(name = "title") val title: String, | ||
@Json(name = "content") val content: String, | ||
@Json(name = "credit") val credit: Int, | ||
@Json(name = "activityDate") val activityDate: LocalDate, | ||
@Json(name = "modifiedAt") val modifiedAt: LocalDateTime, | ||
@Json(name = "approveState") val approveState: ApproveStatus, | ||
) |
Oops, something went wrong.