-
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
2 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
18 changes: 15 additions & 3 deletions
18
src/main/java/study/book/object/movie/condition/DiscountCondition.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 |
---|---|---|
@@ -1,8 +1,20 @@ | ||
package study.book.object.movie.condition; | ||
|
||
import study.book.object.movie.Screening; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
public interface DiscountCondition { | ||
import java.time.DayOfWeek; | ||
import java.time.LocalTime; | ||
|
||
boolean isSatisfiedBy(Screening screening); | ||
@Getter @Setter | ||
@ToString | ||
public class DiscountCondition { | ||
private DiscountConditionType type; | ||
|
||
private int sequence; | ||
|
||
private DayOfWeek dayOfWeek; | ||
private LocalTime startTime; | ||
private LocalTime endTime; | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/study/book/object/movie/condition/DiscountConditionType.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,6 @@ | ||
package study.book.object.movie.condition; | ||
|
||
public enum DiscountConditionType { | ||
SEQUENCE, // 순번 조건 | ||
PERIOD //기간 조건 | ||
} |