package com.jeesharp.business.modules.trade.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.jeesharp.framework.mybatis.core.dataobject.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 统一交易订单明细行，映射表 {@code biz_trade_order_item}。
 *
 * @author jeesharp
 * @since 2026-05-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("biz_trade_order_item")
@Schema(description = "统一交易订单明细")
public class TradeOrderItem extends BaseEntity<TradeOrderItem> {

    @Schema(description = "主单ID")
    private String orderId;

    @Schema(description = "行号")
    private Integer lineNo;

    @Schema(description = "行标题快照")
    private String itemTitle;

    @Schema(description = "SKU引用")
    private String skuRef;

    @Schema(description = "资源引用")
    private String resourceRef;

    @Schema(description = "数量")
    private Integer quantity;

    @Schema(description = "单价")
    private BigDecimal unitPrice;

    @Schema(description = "行小计")
    private BigDecimal lineAmount;

    @Schema(description = "行快照JSON")
    private String snapshotJson;
}
