Skip to content

Commit

Permalink
fix: votestatus 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongh00 committed Feb 10, 2024
1 parent f131bea commit 34852a8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.koa.coremodule.vote.application.dto;

import com.koa.coremodule.vote.domain.entity.VoteStatusCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -19,6 +20,7 @@ public class VoteStatus {
private Long voteAttendId;
private Integer total;
private String title;
private VoteStatusCheck status;
private List<VoteItemStatus> items;

@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.koa.coremodule.vote.domain.entity.Vote;
import com.koa.coremodule.vote.domain.entity.VoteItem;
import com.koa.coremodule.vote.domain.entity.VoteItemRecord;
import com.koa.coremodule.vote.domain.entity.VoteStatus;
import com.koa.coremodule.vote.domain.entity.VoteStatusCheck;
import com.koa.coremodule.vote.domain.exception.VoteException;
import com.koa.coremodule.vote.domain.service.VoteQueryService;
import com.koa.coremodule.vote.domain.service.VoteSaveService;
Expand Down Expand Up @@ -45,7 +45,7 @@ public Long saveVote(VoteRequest voteRequest) {
Vote vote = Vote.builder()
.voteTitle(voteEntity.getVoteTitle())
.notice(notice)
.status(VoteStatus.PRESENT)
.status(VoteStatusCheck.PRESENT)
.build();

// Vote 엔티티 저장
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public class Vote extends BaseEntity {
private Long id;

private String voteTitle;
private VoteStatus status;
private VoteStatusCheck status;

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "notice_id")
private Notice notice;

public void updateStatus() {
this.status = VoteStatus.FINISHED;
this.status = VoteStatusCheck.FINISHED;
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.koa.coremodule.vote.domain.entity;

public enum VoteStatus {
public enum VoteStatusCheck {
PRESENT, FINISHED
}

0 comments on commit 34852a8

Please sign in to comment.