package com.ruoyi.ss.store.domain;

import com.ruoyi.common.core.domain.ValidGroup;
import com.ruoyi.common.valid.EnumValid;
import com.ruoyi.ss.store.domain.enums.StoreGroupBy;
import com.ruoyi.ss.storeStaff.domain.StoreStaffQuery;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

/**
 * 2024/4/27
 *
 * @author wjh
 */
@Data
public class StoreQuery extends Store {

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

    @ApiModelProperty("当前所在位置")
    @Size(min = 2, max = 2, message = "当前位置必须传入经度和纬度两个值", groups = {ValidGroup.Query.class})
    private List<BigDecimal> center;

    @ApiModelProperty("查询半径（米）")
    @Min(value = 0, message = "半径不允许小于0", groups = {ValidGroup.Query.class})
    private BigDecimal radius;

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

    @ApiModelProperty("用户id列表")
    private List<Long> userIds;

    @ApiModelProperty("分组字段")
    @EnumValid(
            clazz = StoreGroupBy.class,
            message = "非法的分组字段",
            method = "name"
    )
    private String groupBy;

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

    @ApiModelProperty("是否在员工信息中（根据员工信息筛选时使用）")
    private Boolean inStaff;

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

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