export interface Store {
  globalMask: boolean;

  env: {
    server: Server;
    loginName: string;
    password: string;
    user: {
      campusId: number;
      schoolId: number;
      userId: number;
      userName: string;
      userRole: string;
    };
    exam: {
      id: number;
      name: string;
      examTime: string;
    };
    examId: number;
  };

  config: {
    db: DB;
    imageUrl: ImageURL;
    watermark: Watermark;
    logger: Logger;
    openDevTools: boolean;
    servers: Server[];
    imagemagickDev?: string;
  };

  syncTime: Array<{ id: string; time: string }>;

  pageInputs: {
    "/image-download": {
      type: string;
      template: string;
      dir: string;
      append: boolean;
      failover: boolean;
      watermark: boolean;
      trackMode: string;
      examNumber?: string;
      subjectCode?: string;
      x?: number;
      y?: number;
    };
  };
}

export interface DB {
  host: string;
  post: number;
  user: string;
  password: string;
  database: string;
}

export interface ImageURL {
  sheet: string;
  package: string;
}

export interface Logger {
  level: string;
}

export interface Server {
  name: string;
  host: string;
}

export interface Watermark {
  fontFile: string;
  fontSize: number;
  color: string;
  nextColor: string;
  otherColor: string;
}

export interface Student {
  id: number;
  schoolId: number;
  examNumber: string;
  campusCode: string;
  campusName: string;
  subjectCode: string;
  subjectName: string;
  name: string;
  studentCode: string;
  packageCode: string;
  batchCode: string;
  sheetCount: number;
  sliceCount: number;
  answers: string;
  upload: boolean;
  absent: boolean;
  manualAbsent: boolean;
  breach: boolean;
  objectiveScore: string;
  subjectiveScore: string;
  examRoom: string;
  remark: string;
  college: string;
  className: string;
  teacher: string;
  inspector?: Inspector;
  objectiveScoreDetail: SubjectiveScoreDetail[];
  subjectiveScoreDetail: SubjectiveScoreDetail[];
  sheetUrls: string[];
}

export interface Inspector {
  loginName: string;
  name: string;
}

export interface SubjectiveScoreDetail {
  mainNumber: number;
  subNumber: string;
  score: number;
  marker: string;
  groupNumber: number;
  mainTitle: string;
}
