package co.yixiang.yshop.module.distributor.controller.admin.distributororder.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import javax.validation.constraints.*;

import org.springframework.format.annotation.DateTimeFormat;

import static co.yixiang.yshop.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 分销商订单 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class DistributorOrderBaseVO {

    @Schema(description = "结算时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime settlementTime;

    @Schema(description = "订单ID", example = "18018")
    private Long oid;

    @Schema(description = "订单号", example = "32634")
    private String orderId;

    @Schema(description = "佣金状态", example = "1")
    private Integer status;

    @Schema(description = "分销规则 0-默认 1-自定义")
    private Integer distributionRule;

    @Schema(description = "分销自购 0-关闭 1-开启")
    private Integer distributionPurchase;

    @Schema(description = "商品结算方式 0-实际支付价格 1-商品价格")
    private Integer distributionProductSettlement;

    @Schema(description = "佣金结算方式 0-支付后结算 1-确认收获后结算 2-订单完成结算")
    private Integer distributionWagesSettlement;

    @Schema(description = "下单用户", example = "625")
    private Long userId;

    @Schema(description = "用户昵称", example = "王五")
    private String userName;

    @Schema(description = "商品ID", example = "32461")
    private Long productId;

    @Schema(description = "商品规格ID", example = "20034")
    private Long productAttrValueId;

    @Schema(description = "商品名称", example = "张三")
    private String productName;

    @Schema(description = "商品金额", example = "27614")
    private BigDecimal productPrice;

    @Schema(description = "订单详情id", example = "12663")
    private Long detailId;

    @Schema(description = "所属一级ID")
    private Long superiorIdP1;

    @Schema(description = "所属一级名称")
    private String superiorNameP1;

    @Schema(description = "所属二级ID")
    private Long superiorIdP2;

    @Schema(description = "所属二级名称")
    private String superiorNameP2;

    @Schema(description = "一级佣金比例")
    private Integer firstWages;

    @Schema(description = "二级佣金比例")
    private Integer secondWages;

    @Schema(description = "一级佣金")
    private BigDecimal firstAmount;

    @Schema(description = "二级佣金")
    private BigDecimal secondAmount;

}
