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

Feature/payment #10

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- TODO
- ERD
- Entity
98 changes: 98 additions & 0 deletions src/main/java/com/shopping/jpa/controller/Board.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
package com.shopping.jpa.controller;

import javax.persistence.*;

@Entity
public class Board {

@Id
@GeneratedValue
private Integer seq;

@Column
@ManyToOne
private Board parent;

@Column
@ManyToOne
private Code category;

@Column
private String title;

@Column
private String content;

@Column
private Integer viewCount;

@Column
private Date regDT;

@Column
private Member regMember;

public Integer getSeq() {
return seq;
}

public void setSeq(Integer seq) {
this.seq = seq;
}

public Board getParent() {
return parent;
}

public void setParent(Board parent) {
this.parent = parent;
}

public Code getCategory() {
return category;
}

public void setCategory(Code category) {
this.category = category;
}

public String getTitle() {
return title;
}

public void setTitle(String title) {
this.title = title;
}

public String getContent() {
return content;
}

public void setContent(String content) {
this.content = content;
}

public Integer getViewCount() {
return viewCount;
}

public void setViewCount(Integer viewCount) {
this.viewCount = viewCount;
}

public Date getRegDT() {
return regDT;
}

public void setRegDT(Date regDT) {
this.regDT = regDT;
}

public Member getRegMember() {
return regMember;
}

public void setRegMember(Member regMember) {
this.regMember = regMember;
}
}
21 changes: 21 additions & 0 deletions src/main/java/com/shopping/jpa/controller/Payment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.shopping.jpa.controller;

import javax.persistence.*;

@Entity
public class Payment {

@Id
private String id;

@Column
@ManyToOne
private Order order;

@Column
@ManyToOne
private Code type;

@Column
private int value;
}
98 changes: 98 additions & 0 deletions src/main/java/com/shopping/jpa/model/Board.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
package com.shopping.jpa.model;

import javax.persistence.*;

@Entity
public class Board {

@Id
@GeneratedValue
private Integer seq;

@Column
@ManyToOne
private Board parent;

@Column
@ManyToOne
private Code category;

@Column
private String title;

@Column
private String content;

@Column
private Integer viewCount;

@Column
private Date regDT;

@Column
private Member regMember;

public Integer getSeq() {
return seq;
}

public void setSeq(Integer seq) {
this.seq = seq;
}

public Board getParent() {
return parent;
}

public void setParent(Board parent) {
this.parent = parent;
}

public Code getCategory() {
return category;
}

public void setCategory(Code category) {
this.category = category;
}

public String getTitle() {
return title;
}

public void setTitle(String title) {
this.title = title;
}

public String getContent() {
return content;
}

public void setContent(String content) {
this.content = content;
}

public Integer getViewCount() {
return viewCount;
}

public void setViewCount(Integer viewCount) {
this.viewCount = viewCount;
}

public Date getRegDT() {
return regDT;
}

public void setRegDT(Date regDT) {
this.regDT = regDT;
}

public Member getRegMember() {
return regMember;
}

public void setRegMember(Member regMember) {
this.regMember = regMember;
}
}
21 changes: 21 additions & 0 deletions src/main/java/com/shopping/jpa/model/Payment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.shopping.jpa.model;

import javax.persistence.*;

@Entity
public class Payment {

@Id
private String id;

@Column
@ManyToOne
private Order order;

@Column
@ManyToOne
private Code type;

@Column
private int value;
}