// 职高对口/文化类填报

import {ApiResponse, Entity} from "@/types/index";
import {University} from "@/types/university";
import {EnumSimulatePickType} from "@/common/enum";

export type SortType = 'letter' | 'number' // 除了字母，其它都按数字处理

export interface BatchConfig {
    "batch": number;
    "profession": number; // profession limitation
    "groups": number; // major group limitation
}

export interface VoluntaryData {
    "batches": BatchConfig[];
    "minScore": number;
    "newGaokaoType": number;
    "location": string;
    "sort": SortType;
    "maxScore": number;
}

export interface ScoreRank extends Entity {
    "location": string;
    "year": string;
    "mode": string;
    "score": number;
    "num": number;
    "numTotal": number;
    "status": number;
    "maxScore": number;
    "lowestRank": number;
    "highestRank": number;
    "scoreRank": string | null;
    "type": string | null;
}

export interface BatchEntity extends Entity {
    "batch": number;
    "name": string;
    "year": string;
    "score2": number;
    "recommand": boolean;
    "tips": string;
    "ben": boolean;
}

export interface VoluntaryHeaderResponse extends ApiResponse<string[]> {
    isMock: boolean;
}

export interface VoluntaryPlan {
    "collegeCode": string;
    "year": string;
    "type": string;
    "universityId": string;
    "universityNameText": string;
    "planCount": number;
    "course": string;
    "group": string;
    "groupsName": string;
    "majorCount": number;
}

export interface VoluntaryHistory {
    "year": string;
    "type": string;
    "score": number;
    "seat": number;
    "numReal": number;
    "collect": boolean;
    "collectDesc": string;
    "sinoForeignDesc": string;
    "group": string;
    "inheritScore": boolean;
    "sinoforeign": boolean;
}

export interface SimulatePickType {
    text: string;
    value: number;
}

export interface VoluntaryRecommend {
    "pickType": EnumSimulatePickType;
    "specialProject": string;
    "enrollOver": number;
    "enrollRatio": string;
    "enrollRatioText": string;
    "jCode": string;
    "university": University;
    "recruitPlan": VoluntaryPlan;
    "histories": VoluntaryHistory[],
    "history": VoluntaryHistory;
}

export interface VoluntaryMajor {
    "id": number;
    "marjorId": string;
    "marjorBelongs": string;
    "marjorCode": string;
    "marjorName": string;
    "marjorDirection": string;
    "planCount": number;
    "xuefei": string;
    "xuezhi": string;
    "pickType": EnumSimulatePickType;
    "enrollOver": number;
    "enrollRatio": string;
    "enrollRatioText": string;
    "professionType": string;
    "typeNames": string | null;
    "level": string | null;
    "enrollFluctuate": boolean; // 大小年
    "limitationTags": string;
    "isNew": number;
    "histories": VoluntaryHistory[],
    "history": VoluntaryHistory
}

export interface VoluntaryWishMajorDto {
    id: number;
    code: string;
    name: string;
    pickType: EnumSimulatePickType;
    submitMajorId: number;
    enrollRatio: string;
    enrollRatioText: string;
    enrollFluctuate: boolean;
}

export interface VoluntaryWishDto {
    uniqueCode: string;
    universityId: number;
    collegeCode: string;
    code: string;
    jCode: string;
    name: string;
    pickType: EnumSimulatePickType;
    enrollRatio: string;
    enrollRatioText: string;
    ranking: number | string;
    rankingOfEdu: string | number;
    seat: number | null;
    marjors: VoluntaryWishMajorDto[]
}

export interface VoluntaryBatchDto {
    batch: number;
    name: string;
    score1: string | number;
    score2: string | number;
    scoreBatchLimit: number;
    recommand: boolean;
    scores: [],
    wishes: VoluntaryWishDto[],
    sort: string;
    paramBatches: BatchConfig[];
    highlightMajorIds: string[];
}

export interface VoluntaryDetailDto {
    batch: number;
    mode: string;
    score: string;
    seatInput: string;
    year: string;
    isMock: boolean;
}

export interface VoluntaryDto {
    id: number | null;
    name: string;
    batch: number;
    detail: VoluntaryDetailDto;
}

export interface VoluntaryEntity extends Entity {
    "customerCode": string;
    "type": number;
    "code": string;
    "name": string;
    "exactName": boolean;
    "batch": string;
    "batchName": string;
    "mode": string;
    "score": number;
    "detail": string;
    "summary": string[]
    "status": number;
    "obsoleted": number;
}

export interface UniversityFilter {
    "locations": string[],
    "natureTypes": string[],
    "types": string[],
    "levels": string[],
    "features": string[]
}