feat(scanner): add scanner category validation logic and related tests
This commit is contained in:
@@ -38,6 +38,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
'display_categories',
|
||||
'display_seach_bar',
|
||||
'display_cart',
|
||||
'scanner_category_validation_enabled',
|
||||
'event_title',
|
||||
'event_location',
|
||||
'event_date_text',
|
||||
@@ -53,6 +54,7 @@ class Tenant extends Model
|
||||
'display_categories' => true,
|
||||
'display_seach_bar' => true,
|
||||
'display_cart' => true,
|
||||
'scanner_category_validation_enabled' => true,
|
||||
];
|
||||
|
||||
public function getRouteKeyName(): string
|
||||
@@ -60,6 +62,11 @@ class Tenant extends Model
|
||||
return 'codigo';
|
||||
}
|
||||
|
||||
public function requiresScannerCategoryValidation(): bool
|
||||
{
|
||||
return $this->scanner_category_validation_enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
@@ -74,6 +81,7 @@ class Tenant extends Model
|
||||
'display_categories' => 'boolean',
|
||||
'display_seach_bar' => 'boolean',
|
||||
'display_cart' => 'boolean',
|
||||
'scanner_category_validation_enabled' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user