package com.erp.report.dto;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.math.BigDecimal;

/**
 * 采购报表请求DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PurchaseReportRequest {

    @Min(value = 1, message = "页码最小为1")
    @Builder.Default
    private Integer page = 1;

    @Min(value = 1, message = "每页数量最小为1")
    @Max(value = 100, message = "每页数量最大为100")
    @Builder.Default
    private Integer pageSize = 20;

    private String platform;

    private Long shopId;

    private Long warehouseId;

    private String startDate; // yyyy-MM-dd

    private String endDate; // yyyy-MM-dd

    @Pattern(regexp = "draft|under_review|approved|rejected|completed", message = "status必须是: draft, under_review, approved, rejected, completed")
    private String status;

    @Pattern(regexp = "asc|desc", message = "trend必须是: asc, desc")
    @Builder.Default
    private String trend = "desc";
}
