package com.yuchen.saas.park.service.service.door.communication.domain.card;

import com.yuchen.saas.park.service.service.door.communication.domain.CommandParameter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Positive;
import java.util.Map;
import java.util.Set;

@Data
@AllArgsConstructor(staticName = "of")
@NoArgsConstructor
public class QueryCardParameter implements CommandParameter {
    @Positive
    private long userId;

    @Override
    public Map<@NotBlank String, Object> encoding() {
        return Map.of(
          "current", 1,
          "size", 20,
          "employeeNoList", Set.of(userId)
        );
    }
}
