import {EnumBrochureType} from "@/common/enum";

export interface University {
    bannerUrl: string;
    address: string;
    area: string | number;
    bxLevel: string;
    bxType: string; // 现在似乎没有值
    cityName: string;
    code: string;
    collect: string | number;
    collected: boolean;
    comScore: string | number;
    enrollLocation: string;
    features: string;
    hits: number;
    id: number;
    location: string;
    logo: string;
    name: string;
    natureTypeCN: string;
    star: string;
    type: string;
    webSite: string;
    tier: string;
    tierName: string;
    introduction: string;

    createdYear: string;
    zhaoBanDH?: string; // 招生电话
    zhaoBanWZ?: string; // 招生官网
    images?: UniversityStyle[]; 
}

export interface UniversityProfession {
    "remark": string;
    "id": string | number;
    "collegeCode": string;
    "type": string;
    "code": string;
    "name": string;
    "ranking": number | null;
    "count": number | null;
    "hot": number | null;
    "examType": string;
    "enrollCode": string;
    "majorDirection": string;
}

export interface UniversityBrochure {
    "createBy": string;
    "createTime": string;
    "updateBy": string;
    "updateTime": string;
    "remark": string;
    "id": number;
    "year": string;
    "collegeCode": string;
    "collegeName": string;
    "editor": string;
    "url": string;
    "summary": string;
    "title": string;
    "isArt": boolean | null;
    "type": EnumBrochureType;
    "metaDescription": string;
    "content": string;
    "tags": string;
    "isShow": number;
    "hits": number;
    "createTime2": string;
    "typeName": string;

    "logo"?: string;
}

export type HistoryMode = 'plan' | 'enroll';

export interface IPlanEnrollHistory {
    "id": number;
    "collegeCode": string;
    "year": string;
    "level": string;
    "marjorDirection": string;
    "specialProject": string;
    "examMajor": string;
    "majorGroup": string;
    "majorCode": string;
    "majorName": string;
    "enrollCode": string;
    "totalRule": string;
    fee: string;
    xueZhi: string
}

export interface UniversityPlanHistory extends IPlanEnrollHistory {
    "planNum": number | null;
    "fee": string;
    "xueZhi": string;
    "acceptanceRate": string;
}

export interface UniversityEnrollHistory extends IPlanEnrollHistory {
    "minScore": number | null;
    "minSeat": number | null;
    "realNum": number | null;
}

export interface IPlanEnrollDescriptor {
    prop: string;
    title?: string;
    value?: string | number;
    titleOnly?: boolean;
}

export interface UniversityDetail {
    baseInfo: University;
    enrollBrochures: UniversityBrochure[];
    enrollHistories: [];
    planHistories: [];
    professions: UniversityProfession[];
}

export interface UniversityStyle {
    "searchValue": string;
    "createBy": string;
    "createTime": string;
    "updateBy": string;
    "updateTime": string;
    "remark": string;
    "id": string;
    "collegeCode": string;
    "description": string;
    "isBanner": boolean | null;
    "url": string;
    "type": string | number;
    "coverUrl": string;
    "sort": number;
}

export interface UniversityQueryDto {
    name: string;
    features: string[];
    type: string[];
    natureTypeCN: string[];
    location: string[];
    level: string[];
    tiers: string[];
}

export interface UniversityTier {
    typeName: string;
    typeValue: string | number;
    desc: string;
    list: University[];

    /*UI props begin 后台不用管*/
    colorFrom?: string;
    colorTo?: string;
    colorText?: string;
    icon?: string;
    /*UI props end*/
}

export interface UniversityFilter {
    features: string[];
    types: string[];
    natureTypes: string[];
    bxTypes: string[];
    locations: string[];
    tiers: Record<number, string>;
    stars: Record<number, string>;
}