Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: category_p랑 category_v로 나눔 #19

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.example.neoul.entity.category;


import com.example.neoul.global.entity.BaseEntity;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
Expand All @@ -16,14 +15,15 @@
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "category")
@Table(name = "category_p")
@Entity
public class Category {
public class CategoryP {


@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer category_id;
@Column(name = "pcatogery_id")
private Integer pcategory_id;

@Column(name = "name")
private String categoryName;
Expand All @@ -35,9 +35,9 @@ public class Category {


//TODO dto로 수정하기 나중에
public static Category recruitBrand() {
public static CategoryP recruitBrand() {

Category brandStory = Category.builder()
CategoryP brandStory = CategoryP.builder()

.build();

Expand Down
47 changes: 47 additions & 0 deletions src/main/java/com/example/neoul/entity/category/CategoryV.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.example.neoul.entity.category;


import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;


@DynamicInsert
@DynamicUpdate
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "category_v")
@Entity
public class CategoryV {


@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "vcatogery_id")
private Integer vcategory_id;

@Column(name = "name")
private String categoryName;







//TODO dto로 수정하기 나중에
public static CategoryV recruitBrand() {

CategoryV brandStory = CategoryV.builder()

.build();

return brandStory;
}

}