package org.dromara.biz.domain.bo;

import org.dromara.biz.domain.BizTaskLog;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 任务日志业务对象 biz_task_log
 *
 * @author chenle
 * @date 2025-05-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BizTaskLog.class, reverseConvertGenerate = false)
public class BizTaskLogBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 任务ID(instance_id)
     */
    @NotBlank(message = "任务ID(instance_id)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String taskNo;

    /**
     * 操作类型（新增、审批、中心下发）
     */
    @NotBlank(message = "操作类型（新增、审批、中心下发）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 操作用户ID
     */
    @NotNull(message = "操作用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 操作用户名称
     */
    @NotBlank(message = "操作用户名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userName;

    /**
     * 操作单位ID
     */
    @NotBlank(message = "操作单位ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deptId;

    /**
     * 操作单位名称
     */
    @NotBlank(message = "操作单位名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deptName;

    /**
     * 操作时间
     */
    @NotNull(message = "操作时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date optime;

    /**
     * 操作IP
     */
    @NotBlank(message = "操作IP不能为空", groups = { AddGroup.class, EditGroup.class })
    private String opip;

    /**
     * 关联ID
     */
    @NotBlank(message = "关联ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String relationId;

    /**
     * 操作的简要描述，例如审批意见、退回原因等
     */
    @NotBlank(message = "操作的简要描述，例如审批意见、退回原因等不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;
    private String imageUrl;
    private String fileUrl;
    private String signUrl;
    private String policeNum;

}
