92 lines
1.4 KiB
Java
92 lines
1.4 KiB
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;
|
|
|
|
/**
|
|
* 分类ID(冗余)
|
|
*/
|
|
private String categoryId;
|
|
|
|
/**
|
|
* 商品名称(冗余)
|
|
*/
|
|
private String productName;
|
|
|
|
/**
|
|
* 商品规格(冗余)
|
|
*/
|
|
private String productSpec;
|
|
|
|
/**
|
|
* 单位(冗余)
|
|
*/
|
|
private String unit;
|
|
|
|
/**
|
|
* 成本价(冗余)
|
|
*/
|
|
private BigDecimal costPrice;
|
|
|
|
/**
|
|
* 销售单价(当时标价)
|
|
*/
|
|
private BigDecimal price;
|
|
|
|
/**
|
|
* 商品图片URL(冗余)
|
|
*/
|
|
private String imageUrl;
|
|
|
|
/**
|
|
* 商品条码(冗余)
|
|
*/
|
|
private String barcode;
|
|
|
|
/**
|
|
* 库存预警阈值(冗余)
|
|
*/
|
|
private Integer stockAlert;
|
|
|
|
/**
|
|
* 商品描述(冗余)
|
|
*/
|
|
private String description;
|
|
|
|
/**
|
|
* 数量
|
|
*/
|
|
private Integer quantity;
|
|
|
|
/**
|
|
* 小计(单价×数量)
|
|
*/
|
|
private BigDecimal subtotal;
|
|
|
|
@TableField(fill = FieldFill.INSERT)
|
|
private LocalDateTime createdAt;
|
|
}
|