From ef663b17877f78b32f6481c83ee1edd0317874ff Mon Sep 17 00:00:00 2001 From: barami62 Date: Fri, 26 Jan 2024 17:07:01 +0900 Subject: [PATCH] =?UTF-8?q?[#197]=20feat=20:=20=ED=99=98=EA=B8=89=20?= =?UTF-8?q?=EC=97=94=ED=8B=B0=ED=8B=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bc1/gream/domain/user/entity/Refund.java | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/main/java/bc1/gream/domain/user/entity/Refund.java diff --git a/src/main/java/bc1/gream/domain/user/entity/Refund.java b/src/main/java/bc1/gream/domain/user/entity/Refund.java new file mode 100644 index 00000000..250b6f76 --- /dev/null +++ b/src/main/java/bc1/gream/domain/user/entity/Refund.java @@ -0,0 +1,46 @@ +package bc1.gream.domain.user.entity; + +import bc1.gream.domain.common.model.BaseEntity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import lombok.AccessLevel; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Getter +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@Table(name = "tb_refund") +public class Refund extends BaseEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + @Column(nullable = false) + private Long point; + + @Column(nullable = false) + private String bank; + + @Column(nullable = false) + private String accountNumber; + + @ManyToOne(fetch = FetchType.LAZY) + private User user; + + @Builder + private Refund(Long point, String bank, String accountNumber, User user) { + this.point = point; + this.bank = bank; + this.accountNumber = accountNumber; + this.user = user; + } +}