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.util.Map;

/**
 * 表单实例填写内容更新入参模型
 *
 * @author wangli
 * @since 2023/7/20 17:51
 */
@ApiModel("表单实例填写内容更新入参模型")
@Data
public class FormContentUpdateDTO {

    @ApiModelProperty(value = "任务 ID", example = "sss-ss")
    @NotBlank(message = "任务 ID 不能为空")
    private String taskId;

    @ApiModelProperty(value = "使用的表单定义 ID")
    @NotBlank(message = "表单定义 ID 不能为空")
    private String formDefinitionId;

    @ApiModelProperty(value = "表单字段值", example = "{'field1': '1', 'field2': 2}")
    private Map<String, Object> formVariables;

    @ApiModelProperty(value = "任务归属人标识", example = "1")
    @NotBlank(message = "任务归属人不能为空")
    private String userId;

    @NotBlank(message = "租户不能为空")
    private String tenantId;
}
