package cn.teammodel.model.entity.weekDuty;

import cn.teammodel.model.entity.BaseItem;
import com.azure.spring.data.cosmos.core.mapping.Container;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 值周对象是班级,对应一个评价的指标
 * @author winter
 * @create 2023-12-29 15:53
 */
@EqualsAndHashCode(callSuper = true)
@Container(containerName = "School")
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WeekDutyRecord extends BaseItem {
    private String classId;
    private String className;
    private String academicYearId;
    /**
    * 班级得分
    */
    private Integer score;
    private List<WeekDutyItem> nodes;
    private Long createTime;

    @Data
    public static class WeekDutyItem {
        private String id;
        private WeekDuty.DutyTreeNode dutyTreeNode;
        private String spotId;
        private String spotName;
        /**
        * 评分是否传播到学生个人
        */
        private boolean spread;
        private List<String> attachments;
        /**
         * 备注
         */
        private String note;
        private String creator;
        private String creatorId;
        private Long createTime;
    }
}
