subscribtion category variants / system category variants

This commit is contained in:
bs
2025-11-04 01:50:05 -08:00
parent 868f9dbcce
commit a471be8ff9
13 changed files with 254 additions and 12 deletions
@@ -70,6 +70,7 @@ class ProductCategoryVariantsTable extends Table
'className' => 'CakeProducts.ProductCategoryVariantOptions',
'dependent' => true,
'cascadeCallbacks' => true,
'saveStrategy' => 'replace',
]);
$this->hasMany('ProductVariants', [
@@ -102,6 +103,10 @@ class ProductCategoryVariantsTable extends Table
->uuid('product_id')
->allowEmptyString('product_id');
$validator
->boolean('is_system_variant')
->allowEmptyString('is_system_variant');
$validator
->boolean('enabled')
->requirePresence('enabled', 'create')