package cn.teammodel.model.entity.common;

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;


@EqualsAndHashCode(callSuper = true)
@Container(containerName = "Common")
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Exam extends BaseItem {
    public String owner;
    public String name;
    public String school;
    public String creatorId;
    public int stuCount;
    public String lessonRecordId;
    /*        //实际考试人数
            public int realCount;
            //平均分
            public double piont;*/
    //指标
    //public double index;
    public long createTime;
    public long updateTime;
    //public String examCode;

    /// <summary>
    /// 施测起始时间
    /// </summary>
    public long startTime;
    /// <summary>
    /// 施测结束时间
    /// </summary>
    public long endTime;
    /// <summary>
    /// 施测对象
    /// </summary>
    // public List<String> target;
    /// <summary>
    /// 发布
    /// </summary>
    //public String publish;


    public int year;
    //public String range;
    /// <summary>
    /// 评测类型
    /// </summary>
    public String source;
    /// <summary>
    /// 書面問答類型 0:書面問答 1:紙本測驗 2:艺术评测3:多分同步活动
    /// </summary>
    public int qamode;

    /// <summary>
    ///class行政班/teach教学班
    /// </summary>
    //public String classType;
    public List<String> classes;
    public List<String> stuLists;

    public List<PaperSimple> papers;
    ///考试类型 段考 stage  联考 union 平常考 normal 其他 other
    /// </summary>
    public String type;
    public PeriodSimple period;
    public List<Grade> grades;
    public List<ExamSubject> subjects;

    //public Condition conditions;
    //public List<String> blobUrl;
    public String progress;
    public String scope;
    public Custom examType;
    /// <summary>
    /// 所有试卷阅卷状态
    /// </summary>
    //public List<int> marks;
    /// <summary>
    /// TTL删除改变状态使用
    /// </summary>
    public int status;
    public double average;
    //得分率
    public double sRate;
    //缺考率
    public double qRate;
    //缺考人数
    public List<String> lostStu;
    public double standard;
    //记录该评测内容下blob大小
    public long size;
    //进线比列
    public int income;
    //踩线比列
    public int touch;
    public int publish;
    //评分状态，0未评分，1已评分
    public int sStatus;
    public int isCompletion;


    //结束后账户统计
    public List<FMember> staffIds;
    //是否啟動cloudas計算 true:啟動
    public boolean cloudas;
    //統測ID [測試中]
    public String jointExamId;
    public String moofenCode;
    //不可重複作答
    public boolean overwriteDisable;

    @Data
    public static class Custom {
        public String id ;
        public String name ;
    }

    @Data
    public static class ExamSubject
    {
        public String id ;
        public String name ;
        public int classCount ;
    }

    @Data
    public static class PaperSimple {
        public String id ;
        public String subjectId ;
        public String code ;
        //标记试卷来源学段
        public String periodId ;
        public String name ;
        public String blob ;
        public String scope ;
        public int multipleRule ;
        //该试卷配分情况
        public List<Double> point ;
        public List<List<String>> answers ;
        public List<List<String>> knowledge ;
        //题目类型
        public List<String> type ;
        public List<Integer> field ;
        public  String  sheet ;
        public String sheetNo ;

        public String mode ;
        //记录试卷作答时间
        public int time ;


    }
@Data
    public static class PeriodSimple
    {

        public String id ;
        public String name ;
    }
@Data
    public static class Grade
    {
        public String id ;
        public String name ;
    }
@Data
    public static class FMember
    {
        /// <summary>
        /// 账号id
        /// </summary>
        public String id ;
        /// <summary>
        /// 所在学校的学校id
        /// </summary>
        public String code ;
        /// <summary>
        /// 账户类型
        /// </summary>
        public int type ;
        /// <summary>
        /// 分组id
        /// </summary>
        public String groupId ;
        /// <summary>
        /// 分组名称
        /// </summary>
        public String groupName ;
    }
}
