Skip to content

Commit

Permalink
Merge pull request #198 from Team-BC-1/feat/add-refund-entity
Browse files Browse the repository at this point in the history
[#197] feat : 환급 엔티티 추가
  • Loading branch information
yunjae62 authored Jan 26, 2024
2 parents 4fd9e93 + ef663b1 commit bdda214
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/main/java/bc1/gream/domain/user/entity/Refund.java
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit bdda214

Please sign in to comment.