package com.example.volunteer.dto;

import java.time.LocalDate;

/**
 * ============================================================================
 * 动态查询条件对象 — 对应样卷 Q4(c)
 * ============================================================================
 *
 * 【题目 / Question (sample Q4c)】
 * EN — The search function allows users to search sign-ups by event, volunteer name and
 *      sign-up date range, in ANY combination. Complete the service method that returns the
 *      matching sign-ups.
 * 中 — 查询支持按活动、志愿者姓名、报名日期区间**任意组合**筛选，补全返回匹配记录的 Service 方法。
 *
 * 【关键 / Key idea】
 * EN — Every field is OPTIONAL. A null field means "do not filter on this column".
 *      That is why the query cannot be a fixed JPQL string or a derived method name.
 * 中 — 每个字段都是**可选**的；值为 null 表示“这一列不参与过滤”。
 *      所以不能写死 JPQL，也不能用派生查询（16 种组合写不完）。
 */
public class SignupSearch {

    private Long eventId;
    private String volunteerName;
    private LocalDate from;
    private LocalDate to;

    public Long getEventId() { return eventId; }
    public void setEventId(Long eventId) { this.eventId = eventId; }

    public String getVolunteerName() { return volunteerName; }
    public void setVolunteerName(String volunteerName) { this.volunteerName = volunteerName; }

    public LocalDate getFrom() { return from; }
    public void setFrom(LocalDate from) { this.from = from; }

    public LocalDate getTo() { return to; }
    public void setTo(LocalDate to) { this.to = to; }
}
