forked from gongxuegit/tiku-backend.net
feat: add operations catalog readonly endpoints
This commit is contained in:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user