package com.cf.imes.module.system.controller.admin.funds.purchase.vo;

import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.module.system.validation.pay.PayChannelCodeValid;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @author Gqr
 * @since 2025/9/11 17:45
 */
@Schema(description = "管理后台 - 销售明细分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SalesDetailsPageReqVO extends PageParam {
    @Schema(description = "组织ID")
    private Long organId;

    @Schema(description = "订单号")
    private Long id;

    @Schema(description = "产品金额")
    @DecimalMin(value = "0.01", message = "{sales.detail.page.productPrice.min}")
    @DecimalMax(value = "100000", message = "{sales.detail.page.productPrice.max}")
    @Digits(integer = 6, fraction = 2, message = "{sales.detail.page.productPrice.format}")
    private BigDecimal productPrice;

    @Schema(description = "操作人")
    @Size(max = 64, message = "{sales.detail.page.operator.size}")
    private String operator;

    @Schema(description = "交易时间", example = "[2022-07-01 01:01:01 ,2022-07-01 01:01:01]")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "支付方式")
    @PayChannelCodeValid
    private Integer paymentMethod;
}
