package com.xunhong.erp.turbo.api.biz.dto.cmd;

import com.xunhong.erp.turbo.api.biz.dto.enums.AuditStateEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.AuditSubjectTypeEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.AuditTypeEnum;
import com.xunhong.erp.turbo.base.dto.Command;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author shenyifei
 */
@Data
@Schema(title = "审核更新")
@EqualsAndHashCode(callSuper = true)
public class AuditUpdateCmd extends Command {

	/**
	 * 审核Id
	 */
	@Schema(title = "审核Id", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
	private Long auditId;

	/**
	 * 资源Id
	 */
	@Schema(title = "资源Id", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
	private Long subjectId;

	/**
	 * 资源类型
	 */
	@Schema(title = "资源类型", requiredMode = Schema.RequiredMode.REQUIRED)
	private AuditSubjectTypeEnum subjectType;

	/**
	 * 审核状态: 1_待审核；2_审核中；3_审核通过；4_审核驳回；5_审核撤回
	 */
	@Schema(title = "审核状态: 1_待审核；2_审核中；3_审核通过；4_审核驳回；5_审核撤回")
	private AuditStateEnum state;

	/**
	 * 审核类型：1_审核员审核；2_老板审核
	 */
	@Schema(title = "审核类型：1_审核员审核；2_老板审核", requiredMode = Schema.RequiredMode.REQUIRED)
	private AuditTypeEnum type;

	/**
	 * 驳回原因
	 */
	@Schema(title = "驳回原因")
	private String auditReason;

	/**
	 * 审核时间
	 */
	@Schema(title = "审核时间")
	private LocalDateTime auditAt;

	/**
	 * 审核人ID
	 */
	@Schema(title = "审核人ID", type = "string")
	private Long auditBy;

	/**
	 * 审核人名称
	 */
	@Schema(title = "审核人名称")
	private String auditByName;

	/**
	 * 创建人ID
	 */
	@Schema(title = "创建人ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
	private Long createdBy;

	/**
	 * 创建人姓名
	 */
	@Schema(title = "创建人姓名")
	private String createdByName;

	/**
	 * 创建时间
	 */
	@Schema(title = "创建时间")
	private LocalDateTime createdAt;
}

