-
Notifications
You must be signed in to change notification settings - Fork 207
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
43 changed files
with
1,218 additions
and
206 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,30 @@ | ||
name: Java CI with Gradle | ||
|
||
on: | ||
push: | ||
branches: [ "d-h-k", "dhk/main" ] | ||
pull_request: | ||
branches: [ "d-h-k", "dhk/main" ] | ||
check_run: | ||
types: [ rerequested, completed, synchronize ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | ||
|
||
- name: run unit test | ||
run: ./gradlew test |
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,13 @@ | ||
package nextstep.common; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@CommunicationTerm("도메인 커뮤니케이션 용어를 정리하는 어노테이션 입니다") | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.TYPE) | ||
public @interface CommunicationTerm { | ||
String value(); | ||
} |
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,17 @@ | ||
package nextstep.common.domain; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
|
||
public class Image { | ||
@NotBlank(message = "이미지링크는 공백이 허용되지 않습니다") | ||
private final String imageLink; | ||
private Long imageId; | ||
|
||
public Image(String imageLink) { | ||
this.imageLink = imageLink; | ||
} | ||
|
||
public String getImageUrl() { | ||
return imageLink; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/nextstep/common/infrastructure/JdbcImageRepository.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,5 @@ | ||
package nextstep.common.infrastructure; | ||
|
||
public class JdbcImageRepository { | ||
//just placeholder | ||
} |
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,38 @@ | ||
package nextstep.courses.domain; | ||
|
||
import nextstep.utils.DomainId; | ||
|
||
import java.util.Objects; | ||
|
||
public class CourseId implements DomainId { | ||
private Long courseId; | ||
|
||
public CourseId(Long courseId) { | ||
this.courseId = courseId; | ||
} | ||
|
||
@Override | ||
public Long value() { | ||
return courseId; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
CourseId other = (CourseId) o; | ||
return this.hashCode() == other.hashCode(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(courseId); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "CourseId{" + | ||
"courseId=" + courseId + | ||
'}'; | ||
} | ||
} |
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 nextstep.courses.domain; | ||
|
||
public class Creator { | ||
private Long creatorId; | ||
|
||
private String name; | ||
|
||
public Creator(Long creatorId, String name) { | ||
this.creatorId = creatorId; | ||
this.name = name; | ||
} | ||
|
||
public Creator(String name) { | ||
this.name = name; | ||
} | ||
|
||
public Creator(Long creatorId) { | ||
this.creatorId = creatorId; | ||
} | ||
|
||
public Long getCreatorId() { | ||
return creatorId; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Creator{" + | ||
"creatorId=" + creatorId + | ||
", name='" + name + '\'' + | ||
'}'; | ||
} | ||
} |
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,14 @@ | ||
package nextstep.courses.domain; | ||
|
||
import nextstep.users.domain.NsUserId; | ||
|
||
public class Enroll { | ||
private EnrollId enrollId; | ||
private final SessionId sessionId; | ||
private final NsUserId nsUserId; | ||
|
||
public Enroll(Long sessionId, Long nsUserId) { | ||
this.sessionId = new SessionId(sessionId); | ||
this.nsUserId = new NsUserId(nsUserId); | ||
} | ||
} |
Oops, something went wrong.