package com.njcn.rdms.module.project.dal.dataobject.review;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.njcn.rdms.framework.mybatis.core.dataobject.BaseDO;
import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 需求评审记录。
 */
@TableName(value = "rdms_requirement_review", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
public class RequirementReviewDO extends BaseDO {

    @TableId
    private Long id;

    private String objectType;

    private Long requirementId;

    private Long operatorId;

    /**
     * 评审结论：0 通过，1 不通过。
     */
    private Integer conclusion;

    private String reviewContent;

    private BigDecimal requirementEstimatedHours;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<RequirementReviewAttendeeItem> attendees;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<AttachmentItem> attachments;

    private LocalDateTime reviewTime;

}
