-
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.
- Loading branch information
Showing
37 changed files
with
1,116 additions
and
267 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
name: Build Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x gradlew | ||
|
||
- name: Create application.yml | ||
run: | | ||
mkdir -p ./src/main/resources | ||
cd ./src/main/resources | ||
echo "${{ secrets.APPLICATION }}" base64 -d > application.yml | ||
- name: Create service-account-file.json | ||
run: | | ||
mkdir -p ./src/main/resources/firebase | ||
cd ./src/main/resources/firebase | ||
echo "${{ secrets.SERVICE_ACCOUNT_FILE }}" base64 -d > service-account-file.json | ||
- name: Build with Gradle | ||
run: ./gradlew clean build |
36 changes: 36 additions & 0 deletions
36
src/main/java/com/uspray/uspray/DTO/category/CategoryRequestDto.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,36 @@ | ||
package com.uspray.uspray.DTO.category; | ||
|
||
import com.uspray.uspray.domain.Category; | ||
import com.uspray.uspray.domain.Member; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Schema(description = "카테고리 DTO") | ||
public class CategoryRequestDto { | ||
|
||
@NotNull | ||
@Schema(description = "카테고리 이름", example = "카테고리 이름") | ||
private String name; | ||
|
||
@NotNull | ||
@Schema(description = "카테고리 색상", example = "#FFFFFF") | ||
private String color; | ||
|
||
|
||
public Category toEntity(Member member) { | ||
return Category.builder() | ||
.name(name) | ||
.color(color) | ||
.member(member) | ||
.build(); | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/com/uspray/uspray/DTO/category/CategoryResponseDto.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.uspray.uspray.DTO.category; | ||
|
||
import com.uspray.uspray.domain.Category; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@Builder | ||
@NoArgsConstructor | ||
public class CategoryResponseDto { | ||
|
||
@Schema(description = "카테고리 ID", example = "1") | ||
private Long id; | ||
|
||
@Schema(description = "카테고리 소유자 ID", example = "1") | ||
private Long memberId; | ||
|
||
@Schema(description = "카테고리 이름", example = "카테고리 이름") | ||
private String name; | ||
|
||
@Schema(description = "카테고리 색상", example = "#FFFFFF") | ||
private String color; | ||
|
||
@Schema(description = "카테고리 순서", example = "1") | ||
private Integer order; | ||
|
||
public static CategoryResponseDto of(Category category) { | ||
return new CategoryResponseDto(category.getId(), category.getMember().getId(), | ||
category.getName(), category.getColor(), category.getOrder()); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/uspray/uspray/DTO/grouppray/GroupPrayRequestDto.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,11 @@ | ||
package com.uspray.uspray.DTO.grouppray; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class GroupPrayRequestDto { | ||
|
||
private Long groupId; | ||
private String content; | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/uspray/uspray/DTO/grouppray/GroupPrayResponseDto.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,27 @@ | ||
package com.uspray.uspray.DTO.grouppray; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class GroupPrayResponseDto { | ||
|
||
private Long groupPrayId; | ||
private String content; | ||
private Boolean isOwner = false; | ||
private Long authorId; | ||
private Integer liked; | ||
|
||
@QueryProjection | ||
public GroupPrayResponseDto(Long groupPrayId, String content, Long authorId, Integer liked) { | ||
this.groupPrayId = groupPrayId; | ||
this.content = content; | ||
this.authorId = authorId; | ||
this.liked = liked; | ||
} | ||
|
||
public void changeOwner() { | ||
this.isOwner = true; | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/uspray/uspray/DTO/grouppray/GroupPrayUpdateDto.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,9 @@ | ||
package com.uspray.uspray.DTO.grouppray; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class GroupPrayUpdateDto { | ||
private Long groupPrayId; | ||
private String content; | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/uspray/uspray/DTO/pray/PrayListResponseDto.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,20 @@ | ||
package com.uspray.uspray.DTO.pray; | ||
|
||
import com.uspray.uspray.DTO.pray.request.PrayResponseDto; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@Builder | ||
@NoArgsConstructor | ||
public class PrayListResponseDto { | ||
|
||
@Schema(description = "카테고리 ID", example = "1") | ||
private Long categoryId; | ||
private List<PrayResponseDto> prays; | ||
} |
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
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,15 @@ | ||
package com.uspray.uspray.Enums; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE) | ||
public enum PrayType { | ||
SHARED("공유 기도"), | ||
PERSONAL("개인 기도"), | ||
GROUP("그룹 기도"), | ||
; | ||
private final String title; | ||
} |
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
Oops, something went wrong.