登记中文来源线索并补Agent与基础设施公司个案
This commit is contained in:
@@ -47,7 +47,7 @@ export type ResearchCandidateBatch = {
|
||||
id: string; sourceId: string; url: string; accessedAt: string; scope: string; complete: boolean;
|
||||
records: {
|
||||
id: string; name: string; url: string | null; categoryId: string;
|
||||
kind: "product" | "promotion"; profileStatus: "readable" | "unavailable" | "archive-only";
|
||||
kind: "product" | "company" | "promotion"; profileStatus: "readable" | "unavailable" | "archive-only";
|
||||
status: "pending-year" | "linked" | "existing-outside-cohort" | "outside-cohort" | "promotion";
|
||||
companyId?: string; evidenceIds?: string[]; note: string;
|
||||
}[];
|
||||
@@ -123,10 +123,10 @@ export function validateResearch(snapshot: ResearchSnapshot) {
|
||||
for (const row of batch.records) {
|
||||
const linked = ["linked", "existing-outside-cohort"].includes(row.status);
|
||||
if (!row.name.trim() || !row.note.trim() || !categories.has(row.categoryId) ||
|
||||
!["product", "promotion"].includes(row.kind) ||
|
||||
!["product", "company", "promotion"].includes(row.kind) ||
|
||||
!["readable", "unavailable", "archive-only"].includes(row.profileStatus) ||
|
||||
!["pending-year", "linked", "existing-outside-cohort", "outside-cohort", "promotion"].includes(row.status) ||
|
||||
(row.kind === "product" && (!row.url || !evidenceUrl(row.url))) ||
|
||||
(row.kind !== "promotion" && (!row.url || !evidenceUrl(row.url))) ||
|
||||
(row.url !== null && !evidenceUrl(row.url)) ||
|
||||
linked !== !!row.companyId || (row.companyId && !companies.has(row.companyId)) ||
|
||||
(row.kind === "promotion") !== (row.status === "promotion") ||
|
||||
|
||||
Reference in New Issue
Block a user