資產物件模型

資產物件模型 An architecture diagram generated by Archify. LifecycleCase · 案件:推進生命週期 · asset-core 模組 · pending / completed / rejected LifecycleCase 案件:推進生命週期 pending / completed / rejected AssetRelation · from → to · validFrom / validTo · asset-core 模組 · 4 種關聯型別 AssetRelation from → to · validFrom / validTo 4 種關聯型別 AssetEvent · append-only 時間軸 · asset-core 模組 AssetEvent append-only 時間軸 Asset · assetNo · type · lifecycleStage · ownerOrg · asset-core 模組 · 核心表 assets Asset assetNo · type · lifecycleStage · ownerOrg 核心表 assets PhysicalDevice · U 位 · 廠牌型號 · 瓦數 · asset-core 模組 PhysicalDevice U 位 · 廠牌型號 · 瓦數 VirtualResource · vCPU · RAM · hostAsset · asset-core 模組 VirtualResource vCPU · RAM · hostAsset NetworkResource · IP · MAC · VLAN · 衝突狀態 · asset-core 模組 NetworkResource IP · MAC · VLAN · 衝突狀態 ApplicationSystem · 權責單位 · 重要性 · asset-core 模組 ApplicationSystem 權責單位 · 重要性 DataAsset · 密級 · 保存政策 · asset-core 模組 DataAsset 密級 · 保存政策 Rack · Room · dcim-rack:機房 / 機櫃 U 位 · Architecture component Rack · Room dcim-rack:機房 / 機櫃 U 位 Cluster · vm-cluster:容量水位 · Architecture component Cluster vm-cluster:容量水位 Subnet · ipam:CIDR · GiST 防重疊 · Architecture component Subnet ipam:CIDR · GiST 防重疊 推進 lifecycleStage N:M 自我關聯 記錄異動 1:1 擴充 rackId(DB 有 FK) clusterId(DB 有 FK) IP 落在網段內(計算) asset-core 模組 Legend 資產物件(asset-core) 專業檢視物件(其他模組) 案件/關聯/事件

核心表 + 1:1 擴充表

  • • 五種資產語意上繼承 Asset,持久化用組合:擴充表主鍵即 asset_id
  • • 統一清冊只查核心表;型別專屬欄位才 join 擴充表
  • • 刻意不用單表繼承,避免大量稀疏欄位

生命週期與案件

  • • planning → procurement → acceptance → deployment → in_service → decommission
  • • 階段只透過 LifecycleCase 推進:一次一步,任一階段可直接除役
  • • 案型:create_asset / change_asset / decommission_check / ip_allocation_request

關聯與專業檢視

  • • 關聯型別:stored_in / executes_on / hosted_on / network_link
  • • 物件關聯頁以雙向 BFS 呈現依賴圖;除役影響另列直接相依者
  • • rackId / clusterId 在 ORM 不建物件關聯,DB 仍有 FK;依賴只由專業模組指向 asset-core