Skip to content

Commit

Permalink
[#11] feat: 기프티콘 엔티티 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayst1232 committed Jan 7, 2024
1 parent 45757b2 commit 43a624a
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/main/java/bc1/gream/domain/sell/entity/Gifticon.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package bc1.gream.domain.sell.entity;

import bc1.gream.domain.model.BaseEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Table(name = "tb_gifticon")
@Entity
public class Gifticon extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "gifticon_url", nullable = false)
private String gifticonImg;

@OneToOne
@JoinColumn(name = "sell_id", nullable = false)
private Sell sell;

// @OneToOne
// @JoinColumn(name = "order_id")
// private Order order;

@Builder
public Gifticon(String gifticonImg, Sell sell) {
this.gifticonImg = gifticonImg;
this.sell = sell;
// this.order = order;
}
}

0 comments on commit 43a624a

Please sign in to comment.