package com.njcn.rdms.module.project.controller.admin.status.vo.transition;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 管理后台 - 对象状态流转保存 Request VO
 */
@Schema(description = "管理后台 - 对象状态流转保存 Request VO")
@Data
public class ObjectStatusTransitionSaveReqVO {

    @Schema(description = "主键 ID", example = "1024")
    private Long id;

    @Schema(description = "对象类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "project")
    @NotBlank(message = "对象类型不能为空")
    @Size(max = 64, message = "对象类型长度不能超过64个字符")
    private String objectType;

    @Schema(description = "动作编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "start")
    @NotBlank(message = "动作编码不能为空")
    @Size(max = 64, message = "动作编码长度不能超过64个字符")
    private String actionCode;

    @Schema(description = "动作名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "开始")
    @NotBlank(message = "动作名称不能为空")
    @Size(max = 100, message = "动作名称长度不能超过100个字符")
    private String actionName;

    @Schema(description = "起始状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "pending")
    @NotBlank(message = "起始状态编码不能为空")
    @Size(max = 64, message = "起始状态编码长度不能超过64个字符")
    private String fromStatusCode;

    @Schema(description = "目标状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "active")
    @NotBlank(message = "目标状态编码不能为空")
    @Size(max = 64, message = "目标状态编码长度不能超过64个字符")
    private String toStatusCode;

    @Schema(description = "是否必须填写原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
    @NotNull(message = "是否必须填写原因不能为空")
    private Boolean needReason;

    @Schema(description = "配置状态（0启用 1停用）", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @NotNull(message = "配置状态不能为空")
    private Integer status;

    @Schema(description = "备注", example = "默认流转")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

}
