package com.njcn.rdms.module.project.controller.admin.product.vo.activity;

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 ProductActivityPageReqVO extends PageParam {

    @Schema(description = "动态类型", example = "status")
    @Size(max = 16, message = "动态类型长度不能超过16个字符")
    private String activityType;

    @Schema(description = "动作编码", example = "pause")
    @Size(max = 32, message = "动作编码长度不能超过32个字符")
    private String actionType;

    @Schema(description = "操作时间区间", example = "[2026-04-01 00:00:00, 2026-04-30 23:59:59]")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] operateTime;

}
