-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |