62 lines
970 B
Java
62 lines
970 B
Java
package com.example.building.entity;
|
|
|
|
import com.baomidou.mybatisplus.annotation.*;
|
|
import lombok.Data;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.time.LocalDateTime;
|
|
|
|
/**
|
|
* 订单明细实体类
|
|
*/
|
|
@Data
|
|
@TableName("order_items")
|
|
public class OrderItem {
|
|
|
|
@TableId(type = IdType.ASSIGN_UUID)
|
|
private String itemId;
|
|
|
|
/**
|
|
* 订单ID
|
|
*/
|
|
private String orderId;
|
|
|
|
/**
|
|
* 商品ID
|
|
*/
|
|
private String productId;
|
|
|
|
/**
|
|
* 商品名称(冗余)
|
|
*/
|
|
private String productName;
|
|
|
|
/**
|
|
* 商品规格(冗余)
|
|
*/
|
|
private String productSpec;
|
|
|
|
/**
|
|
* 单位(冗余)
|
|
*/
|
|
private String unit;
|
|
|
|
/**
|
|
* 销售单价(当时标价)
|
|
*/
|
|
private BigDecimal price;
|
|
|
|
/**
|
|
* 数量
|
|
*/
|
|
private Integer quantity;
|
|
|
|
/**
|
|
* 小计(单价×数量)
|
|
*/
|
|
private BigDecimal subtotal;
|
|
|
|
@TableField(fill = FieldFill.INSERT)
|
|
private LocalDateTime createdAt;
|
|
}
|