package com.ruoyi.ss.transactionBill.domain;

import com.ruoyi.common.core.domain.ValidGroup;
import com.ruoyi.common.valid.EnumValid;
import com.ruoyi.ss.transactionBill.domain.enums.TransactionBillGroupBy;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @author 辉
 * 2024/3/4
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class TransactionBillQuery extends TransactionBill {
    @ApiModelProperty("年份")
    private Integer year;

    @ApiModelProperty("月份")
    private Integer month;

    @ApiModelProperty("小时")
    private Integer hour;

    @ApiModelProperty("用户名称")
    private String userName;

    @ApiModelProperty("商户名称")
    private String mchName;

    @ApiModelProperty("设备名称")
    private String deviceName;

    @ApiModelProperty("创建日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    @ApiModelProperty("分组字段")
    @EnumValid(
            clazz = TransactionBillGroupBy.class,
            allowNull = true,
            message = "非法的分组字段",
            method = "name",
            groups = {ValidGroup.Query.class}
    )
    private String groupBy;

    @ApiModelProperty("时间是否已过期")
    private Boolean expire;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;

    @ApiModelProperty("订单id列表")
    private List<Long> billIds;

    @ApiModelProperty("设备充值状态列表")
    private List<String> deviceRechargeStatusList;

    @ApiModelProperty("状态列表")
    private List<String> statusList;

    @ApiModelProperty("店铺ID列表")
    private List<Long> storeIds;

    @ApiModelProperty("设备ID列表")
    private List<Long> deviceIds;

    @ApiModelProperty("套餐结束时间（结束）")
    private LocalDateTime endSuitEndTime;

    @ApiModelProperty("套餐结束时间（开始）")
    private LocalDateTime startSuitEndTime;

    @ApiModelProperty("设备SN")
    private String deviceNo;

    @ApiModelProperty("用户手机号")
    private String userMobile;

    @ApiModelProperty("搜索关键词")
    private String keyword;

    @ApiModelProperty("创建日期范围")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private List<LocalDate> createDateRange;

    @ApiModelProperty("支付日期范围")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private List<LocalDate> payDateRange;

    @ApiModelProperty("套餐收费类型列表")
    private List<String> suitFeeTypes;

    @ApiModelProperty("套餐收费模式列表")
    private List<String> suitFeeModes;

    @ApiModelProperty("是否正在使用")
    private Boolean isUsing;

    @ApiModelProperty("结束使用电量（起始）")
    private BigDecimal startSuitEndEle;

    @ApiModelProperty("结束使用电量（结束）")
    private BigDecimal endSuitEndEle;

    @ApiModelProperty("是否已结束")
    private Boolean isFinished;

    @ApiModelProperty("渠道ID列表")
    private List<Long> channelIds;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间（结束）")
    private LocalDateTime createTimeEnd;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间（起始）")
    private LocalDateTime createTimeStart;

    @ApiModelProperty("收入人ID")
    private Long incomeUserId;

    @ApiModelProperty("开启员工条件筛选")
    private Boolean inStaff;

    @ApiModelProperty("员工用户ID")
    private Long staffUserId;

    @ApiModelProperty("员工权限")
    private String staffPermission;

    @ApiModelProperty("套餐结束时间是否为空")
    private Boolean isNullSuitEndTime;

}
