package org.jeecg.modules.system.app.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.jeecg.modules.system.app.entity.AppOrderProInfo;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@Schema(description="订单分页列表响应对象")
public class OrderPageVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    private String id;

    @Schema(description = "订单号")
    private String orderCode;

    @Schema(description = "平台名称")
    private Integer orderType;

    @Schema(description = "订单状态 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款")
    private Integer orderStatus;

    @JsonFormat(timezone = "GMT+8",shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "店铺名称")
    private String siteName;

    @Schema(description = "平台名称")
    private String departName;

    @Schema(description = "商品数量")
    private Integer Amount;

    @Schema(description = "实际支付价")
    private BigDecimal price;

    @Schema(description = "用户电话")
    private String usersPhone;

    @Schema(description = "orgCode")
    private String orgCode;

    /**
     * 是否分账（0-否 1-是）
     */
    @Schema(description = "是否分账（0-否 1-是）")
    private Integer orProfitSharing;

    /**
     * 分账状态
     */
    @Schema(description = "分账状态 0-未分账 1-分账中 2-已分账")
    private Integer profitSharingStatus;

    @Schema(description = "子订单信息")
    private List<AppOrderProInfo> orderProInfoList;
}
