-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat :: 예/적금 엔티티/타입 추가 및 SwaggerUI 설정
- Loading branch information
1 parent
541f754
commit 824e6c5
Showing
16 changed files
with
148 additions
and
12 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
35 changes: 35 additions & 0 deletions
35
myfintech/src/main/java/com/inhyekang/myfintech/config/SwaggerConfig.java
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.inhyekang.myfintech.config; | ||
|
||
import io.swagger.v3.oas.models.Components; | ||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import io.swagger.v3.oas.models.security.SecurityRequirement; | ||
import io.swagger.v3.oas.models.security.SecurityScheme; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class SwaggerConfig { | ||
@Bean | ||
public OpenAPI openAPI() { | ||
String jwt = "JWT"; | ||
SecurityRequirement securityRequirement = new SecurityRequirement().addList(jwt); | ||
Components components = new Components().addSecuritySchemes(jwt, new SecurityScheme() | ||
.name(jwt) | ||
.type(SecurityScheme.Type.HTTP) | ||
.scheme("bearer") | ||
.bearerFormat("JWT") | ||
); | ||
return new OpenAPI() | ||
.components(new Components()) | ||
.info(apiInfo()) | ||
.addSecurityItem(securityRequirement) | ||
.components(components); | ||
} | ||
private Info apiInfo() { | ||
return new Info() | ||
.title("MyFintech API") | ||
.description("내 목돈을 지켜줘! 서비스 API 명세입니다.") | ||
.version("1.0.0"); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
myfintech/src/main/java/com/inhyekang/myfintech/dto/response/FindUserInfoResponse.java
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
2 changes: 1 addition & 1 deletion
2
myfintech/src/main/java/com/inhyekang/myfintech/dto/response/SearchUserResponse.java
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
44 changes: 44 additions & 0 deletions
44
myfintech/src/main/java/com/inhyekang/myfintech/entity/product/Deposit.java
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.inhyekang.myfintech.entity.product; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Table | ||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Deposit { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(nullable = false) | ||
@Enumerated(value = EnumType.STRING) | ||
private DepositType type; | ||
|
||
@Column(nullable = false) | ||
private String name; | ||
|
||
@Column(nullable = false) | ||
private String company; | ||
|
||
private String maxRate; | ||
|
||
private String defaultRate; | ||
|
||
private String target; | ||
|
||
@Column(nullable = false) | ||
private boolean isProtected; | ||
|
||
@Column(columnDefinition = "TEXT", nullable = false) | ||
private String detail; | ||
|
||
@Column(nullable = false) | ||
private Long URL; | ||
|
||
@Column(nullable = false) | ||
private boolean isBankingSector; | ||
} |
8 changes: 8 additions & 0 deletions
8
myfintech/src/main/java/com/inhyekang/myfintech/entity/product/DepositType.java
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.inhyekang.myfintech.entity.product; | ||
|
||
public enum DepositType { | ||
DEPOSIT, // 정기 예금 | ||
CMA, // CMA | ||
PARKING, // 파킹통장 | ||
MMDA // MMDA | ||
} |
37 changes: 37 additions & 0 deletions
37
myfintech/src/main/java/com/inhyekang/myfintech/entity/product/Savings.java
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.inhyekang.myfintech.entity.product; | ||
|
||
import jakarta.persistence.*; | ||
|
||
public class Savings { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(nullable = false) | ||
@Enumerated(value = EnumType.STRING) | ||
private DepositType type; | ||
|
||
@Column(nullable = false) | ||
private String name; | ||
|
||
@Column(nullable = false) | ||
private String company; | ||
|
||
private String maxRate; | ||
|
||
private String defaultRate; | ||
|
||
private String target; | ||
|
||
@Column(nullable = false) | ||
private boolean isProtected; | ||
|
||
@Column(columnDefinition = "TEXT", nullable = false) | ||
private String detail; | ||
|
||
@Column(nullable = false) | ||
private Long URL; | ||
|
||
@Column(nullable = false) | ||
private boolean isBankingSector; | ||
} |
10 changes: 10 additions & 0 deletions
10
myfintech/src/main/java/com/inhyekang/myfintech/entity/product/SavingsType.java
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.inhyekang.myfintech.entity.product; | ||
|
||
public enum SavingsType { | ||
REGULAR, // 정기적금 | ||
FREE, // 자유적금 | ||
YOUTH, // 청년적금 | ||
YOUNG_JUMP, // 청년도약계좌 | ||
HOUSING_SUBS, // 주택청약통장 | ||
SOLDIER // 군인적금 | ||
} |
2 changes: 1 addition & 1 deletion
2
...yekang/myfintech/entity/RefreshToken.java → ...g/myfintech/entity/user/RefreshToken.java
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
2 changes: 1 addition & 1 deletion
2
.../com/inhyekang/myfintech/entity/User.java → ...inhyekang/myfintech/entity/user/User.java
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
2 changes: 1 addition & 1 deletion
2
myfintech/src/main/java/com/inhyekang/myfintech/facade/UserFacade.java
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
2 changes: 1 addition & 1 deletion
2
myfintech/src/main/java/com/inhyekang/myfintech/repository/RefreshTokenRepository.java
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
2 changes: 1 addition & 1 deletion
2
myfintech/src/main/java/com/inhyekang/myfintech/repository/UserRepository.java
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
2 changes: 1 addition & 1 deletion
2
myfintech/src/main/java/com/inhyekang/myfintech/security/jwt/JwtTokenProvider.java
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