fuliqi
2024-06-07 a1b0f938832dd36eddc66fe2b92ea32ba26dee7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.ycl.jxkg.domain.vo;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ycl.jxkg.domain.base.AbsVo;
import com.ycl.jxkg.domain.entity.ExamTemplate;
 
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
 
import com.ycl.jxkg.domain.question.TemplateQuestionDTO;
import org.springframework.lang.NonNull;
import org.springframework.beans.BeanUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
/**
 * 随机试卷模板展示
 *
 * @author flq
 * @since 2024-06-05
 */
@Data
public class ExamTemplateVO extends AbsVo {
 
    /** 模板名 */
    private String name;
 
    /** 学科id */
    private Integer subjectId;
 
    /** 总分 */
    private BigDecimal score;
 
    /** 是否私有 */
    private String visibility;
 
    /** 建议时间 */
    private Integer suggestTime;
 
    /** 多选扣分类型 */
    private Integer deductType;
 
    /** 多选评分 */
    private BigDecimal deductTypeScore;
 
    /** 题目配置 */
    private List<TemplateQuestionDTO> questionList;
 
    /**  */
    private Integer createUser;
 
    /**  */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
 
    public static ExamTemplateVO getVoByEntity(@NonNull ExamTemplate entity, ExamTemplateVO vo) {
        if(vo == null) {
            vo = new ExamTemplateVO();
        }
        BeanUtils.copyProperties(entity, vo);
        return vo;
    }
 
}