package org.jeecg.modules.oroqen.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 订单项
 * @Author: jeecg-boot
 * @Date: 2025-01-08
 * @Version: V1.0
 */
@Data
@TableName("oroqen_order_item")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "订单项")
public class OroqenOrderItem implements Serializable {
    private static final long serialVersionUID = 1L;

    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private String id;

    /**订单ID*/
    @Excel(name = "订单ID", width = 15)
    @Schema(description = "订单ID")
    private String orderId;

    /**商品ID*/
    @Excel(name = "商品ID", width = 15)
    @Schema(description = "商品ID")
    private String productId;

    /**商品名称*/
    @Excel(name = "商品名称", width = 15)
    @Schema(description = "商品名称")
    private String productName;

    /**商品图片*/
    @Excel(name = "商品图片", width = 15)
    @Schema(description = "商品图片")
    private String productImage;

    /**商品价格*/
    @Excel(name = "商品价格", width = 15)
    @Schema(description = "商品价格")
    private BigDecimal productPrice;

    /**购买数量*/
    @Excel(name = "购买数量", width = 15)
    @Schema(description = "购买数量")
    private Integer quantity;

    /**小计金额*/
    @Excel(name = "小计金额", width = 15)
    @Schema(description = "小计金额")
    private BigDecimal subtotal;

    /**创建人*/
    @Schema(description = "创建人")
    private String createBy;

    /**创建日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建日期")
    private Date createTime;

    /**更新人*/
    @Schema(description = "更新人")
    private String updateBy;

    /**更新日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新日期")
    private Date updateTime;
}