Skip to content

Commit

Permalink
feat: 승인 여부 컬럼 추가 #158
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonsseo committed Jan 11, 2024
1 parent 32f8570 commit 3c5762d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/wowmarket/wow_server/domain/DemandProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.ColumnDefault;
import wowmarket.wow_server.mypage.myproject.MyDemandProject.dto.MyDemandProjectModifyRequestDto;

import java.time.LocalDate;
Expand Down Expand Up @@ -48,6 +49,10 @@ public class DemandProject extends BaseEntity{
private int participant_number;
private Long final_achievement_rate;

@Enumerated(EnumType.STRING)
@ColumnDefault("\"AWAIT\"")
private Permission permission;

@Setter
@Column(columnDefinition="tinyint(0) default 0")
private boolean isEnd;
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/wowmarket/wow_server/domain/Permission.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package wowmarket.wow_server.domain;

public enum Permission {
AWAIT, APPROVED, REJECTED
}
5 changes: 5 additions & 0 deletions src/main/java/wowmarket/wow_server/domain/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.Check;
import org.hibernate.annotations.ColumnDefault;
import wowmarket.wow_server.converter.ReceiveTypeConverter;
import wowmarket.wow_server.mypage.myproject.MySalesProject.dto.MySalesProjectModifyRequestDto;

Expand Down Expand Up @@ -81,6 +82,10 @@ public class Project extends BaseEntity{
@Column(columnDefinition = "integer default 0", nullable = false)
private int likeCnt;

@Enumerated(EnumType.STRING)
@ColumnDefault("\"AWAIT\"")
private Permission permission;

public void setUser(User user){
this.user = user;
}
Expand Down

0 comments on commit 3c5762d

Please sign in to comment.