using Fake.Domain.Repositories; using Oms.Domain.ChannelsAggregate.Entities; namespace Oms.Domain.ChannelsAggregate.Repositories; public interface ISalesProductRepository : IRepository { Task GetByProductCodeAsync(string productCode, CancellationToken cancellationToken = default); Task GetByProductCodeIncludingDeletedAsync( string productCode, CancellationToken cancellationToken = default); Task HasProductCodeAsync(string productCode, CancellationToken cancellationToken = default); Task> GetPricesAsync(int salesProductId, CancellationToken cancellationToken = default); Task GetPriceByIdAsync(int id, CancellationToken cancellationToken = default); Task> GetPriceFactorsAsync(IEnumerable priceIds, CancellationToken cancellationToken = default); Task> GetPriceDetailsAsync(IEnumerable priceIds, CancellationToken cancellationToken = default); Task InsertPriceAsync( SalesProductPrice price, IEnumerable factors, IEnumerable details, CancellationToken cancellationToken = default); Task UpdatePriceAsync( SalesProductPrice price, IEnumerable factors, IEnumerable details, CancellationToken cancellationToken = default); Task DeletePriceAsync(int id, CancellationToken cancellationToken = default); Task UpdatePriceStatusAsync(int id, Oms.Domain.Shared.Enums.EnableStatus status, CancellationToken cancellationToken = default); Task ReplacePricesAsync( int salesProductId, IEnumerable prices, IEnumerable factors, IEnumerable details, CancellationToken cancellationToken = default); Task> GetAllocationProvidersAsync(int salesProductId, CancellationToken cancellationToken = default); Task ReplaceAllocationProvidersAsync(int salesProductId, IEnumerable providers, CancellationToken cancellationToken = default); Task> GetPublishRecordsAsync(int salesProductId, string operatorType, int pageIndex, int pageSize, CancellationToken cancellationToken = default); /// /// 发布记录头(不含 Content / AI 报告),供版本号展示。 /// Task> GetPublishRecordHeadersAsync(int salesProductId, string operatorType, int pageIndex, int pageSize, CancellationToken cancellationToken = default); /// /// 某产品某类发布记录的全部版本头,不含快照正文。 /// Task> GetAllPublishRecordHeadersAsync(int salesProductId, string operatorType, CancellationToken cancellationToken = default); Task CountPublishRecordsAsync(int salesProductId, string operatorType, CancellationToken cancellationToken = default); Task InsertPublishRecordAsync(SalesProductPublishRecord record, CancellationToken cancellationToken = default); Task GetPublishRecordByIdAsync(int id, CancellationToken cancellationToken = default); Task GetPublishRecordByVersionAsync( int salesProductId, string operatorType, string version, CancellationToken cancellationToken = default); Task GetEffectivePublishRecordAsync( int salesProductId, string operatorType, DateTime bindTime, CancellationToken cancellationToken = default); /// /// 批量取各产品在 bindTime 时点生效的最新 Active 发布记录(含 Content)。 /// Task> GetEffectivePublishRecordsAsync( IReadOnlyCollection salesProductIds, string operatorType, DateTime bindTime, CancellationToken cancellationToken = default); }