package com.example.demo.dto.response;
import com.example.demo.entity.WrongBook;
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 17:47
 * @Descrption TODO
 */
@ApiModel(value = "WrongBookDto   wrongbook list返回体",description = "错题本")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WrongBookDto {

    @ApiModelProperty("错题本名字")
    private String name;

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

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

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

    @ApiModelProperty("错题本描述")
    private String description;

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

    public WrongBookDto(WrongBook book){
        this.name = book.getName();
        this.groupName = book.getGroupName();
        this.gradeName = book.getGradeName();
        this.subject = book.getSubject();
        this.description = book.getDescription();
    }

}
