Skip to content

Commit

Permalink
refactor: delete create method from portfolio entity
Browse files Browse the repository at this point in the history
  • Loading branch information
chominho96 committed Mar 31, 2024
1 parent 1051982 commit 2abb0a6
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ public Portfolio(final UUID id, final Instant expireAt) {
this.expireAt = expireAt;
}

private Portfolio(final Instant expireAt) {
public Portfolio(final Instant expireAt, List<PortfolioStock> stocks) {
super(null);
this.stocks = stocks;
this.expireAt = expireAt;
}

public static Portfolio create(final Instant expireAt) {
return new Portfolio(expireAt);
}

public boolean isExpired() {
return expireAt.isAfter(Instant.now());
}
Expand Down

0 comments on commit 2abb0a6

Please sign in to comment.