feat(domain): F004 – expand domain model layer
- need.ts: add SizeRange, MustHaveCriterion, WeightedPreference types; extend Need with desiredLocation, sizeRange, mustHaveCriteria, weightedPreferences, status - futureSignal.ts: add SignalEvidence type; extend FutureSignal with title, evidence, matchabilityScore, reviewStatus - aiOutput.ts: new AIOutput entity with type, inputHash, outputJson, provider/model/promptVersion/schemaVersion, reviewStatus - activityEvent.ts: new ActivityEvent entity with actorId, action, entityType, entityId, timestamp, metadata - unifiedResult.ts: discriminated union (VerifiedPortfolioResult | ExternalMarketResult | FutureAvailabilityResult) - index.ts: export all three new files - Properties.tsx: add LIGHT_INDUSTRIAL + UNKNOWN cases to exhaustive switches Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+28
-2
@@ -1,4 +1,4 @@
|
||||
import type { AssetType } from './enums'
|
||||
import type { AssetType, MatchStatus } from './enums'
|
||||
|
||||
export interface AreaRange {
|
||||
min: number
|
||||
@@ -40,17 +40,43 @@ export interface SoftFactorPreferences {
|
||||
requireHighVisibility?: boolean
|
||||
}
|
||||
|
||||
export interface SizeRange {
|
||||
minSqm: number
|
||||
maxSqm: number
|
||||
}
|
||||
|
||||
export interface MustHaveCriterion {
|
||||
criterion: string
|
||||
description?: string
|
||||
weight?: number // 0–1, how much a miss hurts the score
|
||||
}
|
||||
|
||||
export interface WeightedPreference {
|
||||
criterion: string
|
||||
weight: number // 0–1
|
||||
idealValue?: string | number
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface Need {
|
||||
id: string
|
||||
companyName: string
|
||||
contactName?: string
|
||||
assetType: AssetType
|
||||
requiredArea: AreaRange
|
||||
|
||||
// F004 additions
|
||||
desiredLocation?: string[] // preferred city/district list
|
||||
sizeRange?: SizeRange // structured alias for requiredArea
|
||||
mustHaveCriteria?: MustHaveCriterion[]
|
||||
weightedPreferences?: WeightedPreference[]
|
||||
status?: MatchStatus | 'ACTIVE' | 'INACTIVE' | 'DRAFT' | 'CLOSED'
|
||||
|
||||
preferredLocations: string[]
|
||||
excludedLocations?: string[]
|
||||
budgetRange: BudgetRange
|
||||
timing: Timing
|
||||
mustCriteriaText?: string[]
|
||||
mustCriteriaText?: string[] // legacy — prefer mustHaveCriteria
|
||||
softFactors?: SoftFactorPreferences
|
||||
weightingProfile: WeightingProfile
|
||||
confidenceInCriteria: number
|
||||
|
||||
Reference in New Issue
Block a user