-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] 스키마 변경에 따른 무중단 배포를 진행한다. (#873)
- Loading branch information
Showing
35 changed files
with
285 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 34 additions & 14 deletions
48
backend/bang-ggood/src/main/java/com/bang_ggood/question/domain/Category.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,46 @@ | ||
package com.bang_ggood.question.domain; | ||
|
||
public enum Category { | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import java.util.Objects; | ||
|
||
ROOM_CONDITION(1, "방 컨디션"), | ||
WINDOW(2, "창문"), | ||
BATHROOM(3, "화장실"), | ||
SECURITY(4, "보안"), | ||
OUTSIDE(5, "외부"); | ||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
private final int id; | ||
private final String name; | ||
@Getter | ||
@NoArgsConstructor(access = PROTECTED) | ||
@Entity | ||
public class Category { | ||
|
||
Category(int id, String name) { | ||
this.id = id; | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Integer id; | ||
|
||
@Column(nullable = false) | ||
private String name; | ||
|
||
public Category(String name) { | ||
this.name = name; | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
Category that = (Category) o; | ||
return Objects.equals(id, that.id); | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id); | ||
} | ||
} |
49 changes: 0 additions & 49 deletions
49
backend/bang-ggood/src/main/java/com/bang_ggood/question/domain/CategoryEntity.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.