Skip to content

Commit 19c2137

Browse files
committed
feat : 면접 여부 및 기간 필드 추가
1 parent b9b1c9e commit 19c2137

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/main/java/ddingdong/ddingdongBE/domain/form/entity/Form.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import jakarta.persistence.GenerationType;
99
import jakarta.persistence.Id;
1010
import jakarta.persistence.ManyToOne;
11+
import java.time.LocalDate;
1112
import lombok.AccessLevel;
1213
import lombok.Builder;
1314
import lombok.Getter;
@@ -27,6 +28,15 @@ public class Form {
2728

2829
private String description;
2930

31+
@Column(nullable = false)
32+
private LocalDate startDate;
33+
34+
@Column(nullable = false)
35+
private LocalDate endDate;
36+
37+
@Column(nullable = false)
38+
private boolean hasInterview;
39+
3040
@ManyToOne(fetch = FetchType.LAZY)
3141
private Club club;
3242

src/main/resources/db/migration/V34__from_and_field_create_table.sql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
CREATE TABLE form
22
(
3-
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
4-
title VARCHAR(255) NOT NULL,
5-
description VARCHAR(255),
6-
club_id BIGINT,
3+
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
4+
title VARCHAR(255) NOT NULL,
5+
description VARCHAR(255),
6+
start_date DATE NOT NULL,
7+
end_date DATE NOT NULL,
8+
has_interview BOOLEAN NOT NULL,
9+
club_id BIGINT,
710
CONSTRAINT fk_form_club FOREIGN KEY (club_id) REFERENCES club (id) ON DELETE CASCADE
811
);
912

0 commit comments

Comments
 (0)