using FMDAL.DTO.Asset; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using GB5Shared.ResponseStandard; using System; using System.Collections.Generic; using System.Data.Common; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace FMBLL.Asset { public interface IAssetBLL { Task GetAsset(int AssetId, LoginDTO LoginDTO); Task GetSelectListAsset(CriteriaDTO criteriaDTO, LoginDTO loginDTO); Task SaveAsset(AssetDTO dto, LoginDTO login, CancellationToken ct); /// /// Narrow, transaction-scoped update of only MASSET's RAM snapshot columns — caller owns /// the transaction (see AssetScanEventHandler, which commits this atomically with the /// TASSETLEDGER row that triggered it, per RAM design §4.2). /// Task UpdateAssetSnapshot(AssetSnapshotDTO snapshot, LoginDTO login, DbTransaction tx, CancellationToken ct); /// Soft-deletes an Asset (STATUS=2) — MASSET is a financial/depreciation register, never hard-deleted. Task DeleteAsset(int assetId, LoginDTO login, CancellationToken ct); /// /// True when another active asset of the same AssetTypeId already carries this AssetBatch. /// Shared validator — FAM's TFam save must call this (via IAssetBLL injection) instead of /// re-implementing the same check, per the migration cookbook's "inject, don't copy-paste" rule. /// Task IsDuplicateAssetBatch(int assetTypeId, string assetBatch, int excludeAssetId, LoginDTO login, CancellationToken ct); } }