feat: add operations catalog readonly endpoints

This commit is contained in:
xiong
2026-07-26 15:11:32 +08:00
parent fc80176a90
commit b5be831749
11 changed files with 16190 additions and 3 deletions

View File

@@ -556,6 +556,23 @@ public sealed class PersistenceModelTests
{
using var context = new TikuDbContext(Options);
var productType = context.Model.FindEntityType(typeof(Product))!;
var isActive = productType.FindProperty(nameof(Product.IsActive))!;
var productsTable = StoreObjectIdentifier.Table("products", null);
Assert.Equal("is_active", isActive.GetColumnName(productsTable));
Assert.Contains(
productType.GetIndexes(),
index => !index.IsUnique
&& index.Properties
.Select(property => property.Name)
.SequenceEqual([
nameof(Product.TenantId),
nameof(Product.RegionId),
nameof(Product.Type),
nameof(Product.IsActive),
nameof(Product.SortOrder)
]));
AssertHasUniqueIndex<Order>(nameof(Order.TenantId), nameof(Order.OrderNo));
AssertHasUniqueIndex<ActivationCode>(nameof(ActivationCode.TenantId), nameof(ActivationCode.Code));
AssertHasUniqueIndex<TenantPaymentAccount>(