package com.example.demo.dto.response;

import com.example.demo.entity.Paper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Author hxh
 * @Date 2020-09-16 0:34
 * @Descrption TODO
 */
@ApiModel(value = "ExamDto  exam list返回体，一个examDto表示一个试卷",description = "考试")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ExamDto {

    @ApiModelProperty("试卷号")
    private Integer id;

    @ApiModelProperty("试卷名")
    private String name;

    @ApiModelProperty("年级分类")
    private String groupName;

    @ApiModelProperty("年级")
    private String gradeName;

    @ApiModelProperty("学科")
    private String subject;

    @ApiModelProperty("试卷题集")
    private List<StemDto> stems;

    public ExamDto(Paper paper){
        this.id = paper.getId();
        this.name = paper.getName();
        this.groupName = paper.getGroupName();
        this.gradeName = paper.getGradeName();
        this.subject = paper.getSubject();
    }
}
