forked from codesquad-members-2022/airbnb
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
529eecf
commit 5ea6afd
Showing
3 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package project.airbnb.bnb; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
|
||
@Entity | ||
public class Bnb { | ||
|
||
@Id @GeneratedValue | ||
@Column(name = "bnb_id") | ||
private Long id; | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
Backend/src/main/java/project/airbnb/reservation/Reservation.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package project.airbnb.reservation; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.ManyToOne; | ||
import project.airbnb.bnb.Bnb; | ||
|
||
@Entity | ||
public class Reservation { | ||
|
||
@Id @GeneratedValue | ||
@Column(name = "reservation_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "bnb_id") | ||
private Bnb bnb; | ||
} |
9 changes: 9 additions & 0 deletions
9
Backend/src/main/java/project/airbnb/reservation/ReservationController.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package project.airbnb.reservation; | ||
|
||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class ReservationController { | ||
|
||
|
||
} |