subscribtion category variants / system category variants
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user