package com.xunhong.erp.turbo.biz.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xunhong.erp.turbo.api.biz.dto.enums.OrderAuditStateEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.OrderAuditTypeEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "order_audit")
@EqualsAndHashCode(callSuper = true)
public class OrderAuditDO extends BaseDO<OrderAuditDO> {

	/**
	 * 审核Id
	 */
	@TableId(value = "audit_id", type = IdType.ASSIGN_ID)
	private Long auditId;

	/**
	 * 订单Id
	 */
	@TableField(value = "order_id")
	private Long orderId;

	/**
	 * 审核状态: 1_待审核；2_审核中；3_审核通过：4_审核驳回；5_审核取消；
	 */
	@TableField(value = "state")
	private OrderAuditStateEnum state;

	/**
	 * 审核类型：1_报价审核员审核；2_老板审核
	 */
	@TableField(value = "type")
	private OrderAuditTypeEnum type;

	/**
	 * 驳回原因
	 */
	@TableField(value = "audit_reason")
	private String auditReason;

	/**
	 * 审核时间
	 */
	@TableField(value = "audit_at")
	private LocalDateTime auditAt;

	/**
	 * 审核人ID
	 */
	@TableField(value = "audit_by")
	private Long auditBy;

	/**
	 * 审核人名称
	 */
	@TableField(value = "audit_by_name")
	private String auditByName;

	/**
	 * 创建人ID
	 */
	@TableField(value = "created_by")
	private Long createdBy;

	/**
	 * 创建人姓名
	 */
	@TableField(value = "created_by_name")
	private String createdByName;

}

