Skip to content

Commit 4a0a73e

Browse files
committed
refactor/OPS-373 : 자료 이름 unique 속성 삭제
1 parent e6b7df9 commit 4a0a73e

File tree

1 file changed

+7
-17
lines changed
  • src/main/java/org/tuna/zoopzoop/backend/domain/datasource/entity

1 file changed

+7
-17
lines changed

src/main/java/org/tuna/zoopzoop/backend/domain/datasource/entity/DataSource.java

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,45 +15,35 @@
1515
@Setter
1616
@Entity
1717
@NoArgsConstructor
18-
@Table(
19-
uniqueConstraints = {
20-
// 복합 Unique 제약(folder_id, title)
21-
// 같은 폴더 내에 자료 제목 중복 금지
22-
@UniqueConstraint(columnNames = {"folder_id", "title"})
23-
},
24-
// 폴더 내 자료 목록 조회 최적화
25-
indexes = {
26-
@Index(name = "idx_datasource__folder_id", columnList = "folder_id")
27-
}
28-
)
2918
public class DataSource extends BaseEntity {
3019
//연결된 폴더 id
3120
@ManyToOne(fetch = FetchType.LAZY, optional = false)
3221
@JoinColumn(name = "folder_id")
3322
private Folder folder;
3423

3524
//제목
36-
@Column(nullable = false)
25+
@Column
3726
private String title;
3827

3928
//요약
40-
@Column(nullable = false)
29+
@Column
4130
private String summary;
4231

4332
//소스 데이터의 작성일자
4433
//DB 저장용 createdDate와 다름.
45-
@Column(nullable = false)
34+
@Column
4635
private LocalDate dataCreatedDate;
4736

4837
//소스 데이터 URL
49-
@Column(nullable = false)
38+
@Column
5039
private String sourceUrl;
5140

5241
//썸네일 이미지 URL
5342
@Column
5443
private String imageUrl;
5544

5645
// 자료 출처 (동아일보, Tstory 등등)
46+
@Column
5747
private String source;
5848

5949
// 태그 목록
@@ -62,11 +52,11 @@ public class DataSource extends BaseEntity {
6252

6353
// 카테고리 목록
6454
@Enumerated(EnumType.STRING) // IT, SCIENCE 등 ENUM 이름으로 저장
65-
@Column(nullable = false)
55+
@Column
6656
private Category category;
6757

6858
// 활성화 여부
69-
@Column(nullable = false)
59+
@Column
7060
private boolean isActive = true;
7161

7262
// 삭제 일자

0 commit comments

Comments
 (0)