package com.ai.da.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("查询affiliate列表")
public class AffiliateQueryDTO extends TimeQueryBaseDTO{
    @ApiModelProperty("Active（活跃） || Inactive（过期） || Pending（待审批） || Refused(拒绝)")
    private String status;

    @ApiModelProperty("推广者id")
    private Long affiliateId;

    @Pattern(regexp = "id|createTime|totalIncome|", message = "允许排序字段只有id|createTime|totalIncome")
    @ApiModelProperty("目前允许按id, createTime, totalIncome进行排序")
    private String orderBy = "id";

    @ApiModelProperty("按时间 DESC 降序 || ASC 升序")
    private String order = "ASC";

    @Override
    public String toString() {
        return "AffiliateQueryDTO{" +
                "status='" + status + '\'' + ' ' +
                "startTime='" + super.getStartTime() + '\'' + ' ' +
                "endTime='" + super.getEndTime() + '\'' + ' ' +
                "page='" + super.getPage() + '\'' + ' ' +
                "size='" + super.getSize() + '\'' + ' ' +
                '}';
    }
}
