fix: preserve data granularity and recover tasks safely

This commit is contained in:
Codex
2026-10-11 14:18:56 +08:00
parent 23f3a15a15
commit 603184549b
29 changed files with 4557 additions and 418 deletions
+113 -9
View File
@@ -1,12 +1,116 @@
export type Row = { id: number; year: number; school_name: string; school_code: string; province: string; level: string; major_code: string; major_name: string; department_name: string; department_code: string; direction: string; subjects: string[]; quota: number | null; quota_text: string; quota_scope: string; degree_type: string; study_mode: string; exam_type: string; advisor: string; special_plans: string[]; remarks: string; source: string; source_url: string; fetched_at: string; year_verified: boolean; favorite: boolean; score_total: number | null; score_year: number | null; score_scope: string | null; reference_books?: string[] };
export type Score = { year: number; total: number | null; scope: string; raw_code?: string; department_name?: string; source?: string; note?: string; politics?: number | null; english?: number | null; special_one?: number | null; special_two?: number | null };
export type Row = {
id: number;
year: number;
school_name: string;
school_code: string;
province: string;
level: string;
major_code: string;
major_name: string;
department_name: string;
department_code: string;
direction: string;
subjects: string[];
quota: number | null;
quota_text: string;
quota_scope: string;
degree_type: string;
study_mode: string;
exam_type: string;
advisor: string;
special_plans: string[];
remarks: string;
source: string;
source_url: string;
fetched_at: string;
year_verified: boolean;
favorite: boolean;
score_total: number | null;
score_year: number | null;
score_scope: string | null;
reference_books?: string[];
};
export type Score = {
year: number;
total: number | null;
scope: string;
raw_code?: string;
department_name?: string;
source?: string;
note?: string;
politics?: number | null;
english?: number | null;
special_one?: number | null;
special_two?: number | null;
};
export type History = { record: Row; scores: Score[]; plans: Row[] };
export type Job = { id: string; params: { mode: string; year: number; major_code?: string; provinces: string[] }; status: string; message: string; created_at: string; updated_at: string; records: number; errors: number; completed_units: number };
export type Log = { id: number; created_at: string; level: string; message: string };
export type Job = {
id: string;
params: {
mode: string;
year: number;
major_code?: string;
provinces: string[];
};
status: string;
message: string;
created_at: string;
updated_at: string;
records: number;
errors: number;
completed_units: number;
};
export type Log = {
id: number;
created_at: string;
level: string;
message: string;
};
export type Province = { code: string; name: string };
export type Major = { code: string; name: string; degree_type: string; category: string; discipline: string };
export type Overview = { records: number; schools: number; majors: number; favorites: number; indexed_schools: number; scores: number; years: number[]; provinces: { province: string; count: number }[]; provinces_list: Province[]; sources: { name: string; role: string; url: string }[] };
export type Config = { network_mode: string; pool_url: string; pool_project: string; backup_proxies: string[]; request_interval: number; timeout: number; retries: number };
export type Proxy = { mode: string; route: string; active_proxy: string | null; fallback: boolean; counts: { count?: number; http_type?: { https: number; http: number } }; available: number; quarantined: number; error: string; proxies: { url: string; failed: boolean; active: boolean }[] };
export type Auth = { saved: boolean; valid: boolean; message: string; browser_state: string; browser_message: string };
export type Major = {
code: string;
name: string;
degree_type: string;
category: string;
discipline: string;
};
export type Overview = {
records: number;
schools: number;
majors: number;
favorites: number;
indexed_schools: number;
scores: number;
years: number[];
provinces: { province: string; count: number }[];
provinces_list: Province[];
sources: { name: string; role: string; url: string }[];
};
export type Config = {
network_mode: string;
pool_url: string;
pool_project: string;
backup_proxies: string[];
request_interval: number;
timeout: number;
retries: number;
};
export type Proxy = {
mode: string;
route: string;
active_proxy: string | null;
fallback: boolean;
counts: { count?: number; http_type?: { https: number; http: number } };
available: number;
quarantined: number;
error: string;
proxies: { url: string; failed: boolean; active: boolean }[];
};
export type Auth = {
saved: boolean;
valid: boolean;
message: string;
browser_state: string;
browser_message: string;
};
export type Filters = Record<string, string | number | boolean>;