Skip to content

Commit

Permalink
Merge pull request #31 from UMC-neoul/feature/#29
Browse files Browse the repository at this point in the history
Feat: 엔티티랑 디비 수정
  • Loading branch information
tokyj515 authored Aug 1, 2023
2 parents 826dff4 + 492ee6e commit 8c962f4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/example/neoul/entity/brand/Brand.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public class Brand extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "brand_id")
private Long brandId;
private Long id;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "vcategory_id")
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/example/neoul/entity/brand/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public class Product extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "product_id")
private Long productId;
private Long id;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "brand_id") //기본 0
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/example/neoul/entity/brand/Story.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public class Story extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "story_id")
private Long storyId;
private Long id;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "vcategory_id")
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/example/neoul/entity/notice/Notice.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ public class Notice extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "notice_id")
private Long noticeId;
private Long id;

private String title;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/neoul/service/BoardService.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public List<BoardRes.CategoryBoardSimple> getCategoryList(Long categoryId, int o

for(Product product : productList){
BoardRes.CategoryBoardSimple e = BoardRes.CategoryBoardSimple.builder()
.productId(product.getProductId())
.productId(product.getId())
.categoryId(categoryId)
.brandName(product.getBrand().getName())
.productName(product.getName())
Expand Down

0 comments on commit 8c962f4

Please sign in to comment.