Skip to content

Commit

Permalink
[#183] feat(Performance): 누락된 메소드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hyerinhwang-sailin committed Aug 22, 2024
1 parent 4467318 commit 5b97f61
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.beat.domain.performance.domain;

import com.beat.domain.BaseTimeEntity;
import com.beat.domain.performance.exception.PerformanceErrorCode;
import com.beat.domain.promotion.domain.Promotion;
import com.beat.domain.user.domain.Users;
import com.beat.global.common.exception.BadRequestException;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down Expand Up @@ -146,4 +148,11 @@ public void update(
this.performancePeriod = performancePeriod;
this.totalScheduleCount = totalScheduleCount;
}

public void updateTicketPrice(int newTicketPrice) {
if (newTicketPrice < 0) {
throw new BadRequestException(PerformanceErrorCode.NEGATIVE_TICKET_PRICE);
}
this.ticketPrice = newTicketPrice;
}
}

0 comments on commit 5b97f61

Please sign in to comment.