Skip to content

Commit

Permalink
refactor: #70 악기, 연습실, 공연장 entity에서 판매자(seller)를 nullable한 데이터로 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Wo-ogie committed May 18, 2024
1 parent 138ba49 commit 831c334
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ConcertHall extends TimeTrackedBaseEntity {
@Column(name = "concert_hall_id", nullable = false)
private Long id;

@JoinColumn(name = "seller_id", nullable = false)
@JoinColumn(name = "seller_id")
@ManyToOne(fetch = FetchType.LAZY)
private User seller;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class Instrument extends TimeTrackedBaseEntity {
@Column(name = "instrument_id", nullable = false)
private Long id;

@JoinColumn(name = "seller_id", nullable = false)
@JoinColumn(name = "seller_id")
@ManyToOne(fetch = FetchType.LAZY)
private User seller;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,52 @@ public class PracticeRoom extends TimeTrackedBaseEntity {

@Embedded
private final PracticeRoomImages images = new PracticeRoomImages();

@Embedded
private final PracticeRoomHashtags hashtags = new PracticeRoomHashtags();

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "practice_room_id", nullable = false)
private Long id;
@JoinColumn(name = "seller_id", nullable = false)

@JoinColumn(name = "seller_id")
@ManyToOne(fetch = FetchType.LAZY)
private User seller;

@Column(nullable = false)
private String title;

@Embedded
private FullAddress tradeAddress;

@Column(nullable = false)
private Boolean hasSoundEquipment;

@Column(nullable = false)
private Boolean hasInstrument;

@Column(nullable = false)
private Integer pricePerDay;

@Column(nullable = false)
private Integer pricePerHour;

@Column(nullable = false)
private Integer pricePerMonth;

@Column(nullable = false)
private Short capacity;

@Column(nullable = false)
private String size;

@Column(nullable = false)
private Boolean hasParkingLot;

@Embedded
private PracticeRoomDescription description;

@Embedded
private Coordinate coordinate;

Expand Down

0 comments on commit 831c334

Please sign in to comment.