package com.xunhong.erp.turbo.api.user.dto.qry;

import com.xunhong.erp.turbo.api.user.dto.enums.UserStateEnum;
import com.xunhong.erp.turbo.base.dto.PageQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(title = "查询用户分页请求")
@EqualsAndHashCode(callSuper = true)
public class UserPageQry extends PageQuery {

	/**
	 * 关键词
	 */
	@Schema(title = "关键词")
	private String keyword;

	/**
	 * 会员卡号
	 */
	@Schema(title = "会员卡号")
	private String cardNo;

	@Schema(title = "会员手机号码")
	private String phone;

	@Schema(title = "会员名称")
	private String name;

	@Schema(title = "会员昵称")
	private String nickname;

	/**
	 * 创建时间
	 */
	@Schema(title = "查询创建时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private List<LocalDateTime> createdAt;

	@Schema(title = "是否绑定手机号码")
	private Boolean isBindPhone;

	@Schema(title = "性别")
	private Integer gender;

	@Schema(title = "查询绑定手机号码时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private List<LocalDateTime> bindPhoneAt;

	@Schema(title = "状态")
	private List<UserStateEnum> state;

	/**
	 * 是否是管理员
	 */
	@Schema(title = "是否是管理员")
	private Boolean isAdmin;

	@Schema(title = "会员id列表")
	private List<Long> userIdList;

	// 排除的用户
	@Schema(title = "排除的用户id列表")
	private List<Long> excludeUserIdList;

	@Schema(title = "备注")
	private String remark;

	@Schema(title = "小区id")
	private Long communityId;
}
