package cn.axzo.workflow.common.model.request.form.instance;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Map;

import static cn.axzo.workflow.common.constant.BpmnConstants.NO_TENANT_ID;

/**
 * 表单实例数据响应模型
 *
 * @author wangli
 * @since 2024-11-11 15:26
 */
@ApiModel("表单实例数据响应模型")
@Data
public class FormInstanceSearchDTO implements Serializable {

    /**
     * 表单标识=业务标识
     */
    @ApiModelProperty(value = "表单定义 ID", hidden = true)
    private transient String formDefinitionId;

    /**
     * 实例 ID
     */
    @ApiModelProperty(value = "实例 ID")
    @NotBlank(message = "流程实例不能为空")
    private String processInstanceId;

    /**
     * 任务 ID
     */
    @ApiModelProperty(value = "任务 ID")
    private String taskId;

    /**
     * 用于临时变更表单内容的变量,不对数据库生效,一些特殊场景可使用
     */
    @ApiModelProperty(value = "临时变更表单内容的变量", hidden = true)
    private Map<String,Object> variables;

    /**
     * 租户 ID
     */
    @ApiModelProperty(value = "租户 ID", hidden = true)
    private transient String tenantId = NO_TENANT_ID;
}
