package com.erp.dashboard.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 订单商品明细实体
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("order_items")
public class OrderItem {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long orderId;
    private String skuCode;
    private String skuName;
    private String erpSkuCode;
    private String erpSkuName;
    private Integer quantity;
    private String unit;
    private String spec;
    private String thumbUrl;
    private String barCode;
    private String platformSkuId;
    private String platformSkuName;
    private String originalPrice;
    private String discountPrice;
    private String subtotal;
    private String remark;

    @TableLogic
    private LocalDateTime deletedAt;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}
