第一版
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.gameparlor.entity;
|
||||
|
||||
import com.gameparlor.entity.enums.ItemType;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name = "combo_item")
|
||||
public class ComboItem {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "combo_id", nullable = false)
|
||||
private Combo combo;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(nullable = false, length = 20)
|
||||
private ItemType itemType;
|
||||
|
||||
@Column(nullable = false)
|
||||
private Long itemId;
|
||||
|
||||
@Column(nullable = false)
|
||||
private Integer quantity = 1;
|
||||
|
||||
@Column(nullable = false, precision = 10, scale = 2)
|
||||
private BigDecimal unitPriceAtCreation;
|
||||
}
|
||||
Reference in New Issue
Block a user