Skip to content

Commit

Permalink
🧩:: Petition에 vote 컬럼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyoil2 committed Dec 27, 2023
1 parent 99a3243 commit b2655e2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import petition.petition.domain.petition.domain.types.AccessTypes;
import petition.petition.domain.petition.domain.types.Types;
import petition.petition.domain.user.domain.User;
import petition.petition.domain.vote.domain.Vote;
import petition.petition.infra.StringListConverter;

import javax.persistence.*;
Expand Down Expand Up @@ -55,6 +56,9 @@ public class Petition {
@JoinColumn(name = "user_id")
private User user;

@OneToMany(mappedBy = "petition", orphanRemoval = true)
private List<Vote> comment = new ArrayList<>();

public void modifyPetition(String title, String content, Types types, String location) {
this.title = title;
this.content = content;
Expand Down

0 comments on commit b2655e2

Please sign in to comment.