package io.modules.item.dto;

import io.modules.item.entity.FrontUserEntity;
import io.modules.item.entity.ItemEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.Data;

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

import java.math.BigDecimal;

/**
 * 订单表
 *
 * @author Mark #
 * @since 1.0.0 2025-02-14
 */
@Data
@Schema(name = "订单表")
public class OrderDTO implements Serializable {
    private static final long serialVersionUID = 1L;

	@SchemaProperty(name = "订单编号")
	private Long id;

	@SchemaProperty(name = "用户编号")
	private Long userId;

	@SchemaProperty(name = "商品编号")
	private Long itemId;

	@SchemaProperty(name = " 收货地址ID，关联到收货地址表")
	private Long addressId;

	@SchemaProperty(name = "状态")
	private Integer orderStatus;

	@SchemaProperty(name = "购买数量")
	private Integer quantity;

	@SchemaProperty(name = "订单总金额")
	private BigDecimal totalAmount;
	private BigDecimal price;
	private AddressDTO addressDTO;
	@SchemaProperty(name = "支付状态")
	private Integer paymentStatus;

	@SchemaProperty(name = "支付时间")
	private Date paymentDate;

	@SchemaProperty(name = "订单创建时间")
	private Date createdTime;

	private UserDTO user;
	private FrontUserEntity userEntity;
	private ItemDTO item;

	/**
	 * 订单评价分数
	 */
	private Integer score;

	/**
	 * 评价内容
	 */
	private String content;
}
