package com.njcn.rdms.module.project.controller.admin.personal.vo.item;

import com.njcn.rdms.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static com.njcn.rdms.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 个人事项分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class PersonalItemPageReqVO extends PageParam {

    @Schema(description = "关键词，匹配个人事项标题", example = "沟通纪要")
    private String keyword;

    @Schema(description = "负责人用户编号；当前阶段仅支持查询本人事项", example = "3001")
    private Long ownerId;

    @Schema(description = "个人事项状态编码", example = "pending")
    @Size(max = 32, message = "个人事项状态编码长度不能超过32个字符")
    private String statusCode;

    @Schema(description = "更新时间", example = "[2026-05-01 00:00:00, 2026-05-31 23:59:59]")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] updateTime;
}
