-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Content Status and Store View filters #1602
Merged
gabrieldagama
merged 10 commits into
magento:2.0-develop
from
gabrieldagama:introduce-enable-store-view-filters
Jul 21, 2020
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f9c8493
Introduced the MediaGalleryContentUi
468ef4a
Fixing conflicts
dd40f1e
Moved feature to MediaGalleryUi
6f791d4
Fixing static tests
6705d53
Addressing code review sugestion
d9dd48d
Added test case
727c222
Added test case id
d496047
Merge branch '2.0-develop' into introduce-enable-store-view-filters
sivaschenko c257842
Merge branch '2.0-develop' of github.com:magento/adobe-stock-integrat…
1eefe4c
Merge branch 'introduce-enable-store-view-filters' of github.com:gabr…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/ContentField.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\MediaGalleryUi\Model\SearchCriteria\CollectionProcessor\FilterProcessor; | ||
|
||
use Magento\Framework\Api\Filter; | ||
use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface; | ||
use Magento\Framework\Data\Collection\AbstractDb; | ||
use Magento\MediaContentApi\Api\GetAssetIdsByContentFieldInterface; | ||
|
||
/** | ||
* Class responsible to filter a content field | ||
*/ | ||
class ContentField implements CustomFilterInterface | ||
{ | ||
private const TABLE_ALIAS = 'main_table'; | ||
|
||
/** | ||
* @var GetAssetIdsByContentFieldInterface | ||
*/ | ||
private $getAssetIdsByContentStatus; | ||
|
||
/** | ||
* ContentField constructor. | ||
* | ||
* @param GetAssetIdsByContentFieldInterface $getAssetIdsByContentStatus | ||
*/ | ||
public function __construct( | ||
GetAssetIdsByContentFieldInterface $getAssetIdsByContentStatus | ||
) { | ||
$this->getAssetIdsByContentStatus = $getAssetIdsByContentStatus; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function apply(Filter $filter, AbstractDb $collection): bool | ||
{ | ||
$collection->addFieldToFilter( | ||
self::TABLE_ALIAS . '.id', | ||
['in' => $this->getAssetIdsByContentStatus->execute($filter->getField(), $filter->getValue())] | ||
); | ||
|
||
return true; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
MediaGalleryUi/Test/Mftf/ActionGroup/AdminMediaGalleryApplySelectFilterActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminMediaGalleryApplySelectFilterActionGroup"> | ||
<annotations> | ||
<description>Applies select filter to the media gallery grid</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="selectLabel" type="string"/> | ||
<argument name="selectOption" type="string"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
</arguments> | ||
|
||
<click selector="{{AdminEnhancedMediaGalleryFiltersSection.selectFilterInput(selectLabel)}}" stepKey="openSelectFilter"/> | ||
<click selector="{{AdminEnhancedMediaGalleryFiltersSection.selectFilterInputOption(selectLabel, selectOption)}}" stepKey="selectFilterOption"/> | ||
</actionGroup> | ||
</actionGroups> |
20 changes: 20 additions & 0 deletions
20
...lleryUi/Test/Mftf/ActionGroup/AdminOpenMediaGalleryForExistingPageNoEditorActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminOpenMediaGalleryForExistingPageNoEditorActionGroup"> | ||
gabrieldagama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContent"/> | ||
<waitForElementVisible selector="{{CmsWYSIWYGSection.InsertImageBtn}}" stepKey="waitForInsertImageButton" /> | ||
<click selector="{{CmsWYSIWYGSection.InsertImageBtn}}" stepKey="clickInsertImage" /> | ||
<!-- wait for initial media gallery load, where the gallery chrome loads (and triggers loading modal) --> | ||
<waitForPageLoad stepKey="waitForMediaGalleryInitialLoad"/> | ||
<!-- wait for second media gallery load, where the gallery images load (and triggers loading modal once more) --> | ||
<waitForPageLoad stepKey="waitForMediaGallerySecondaryLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDisabledContentFilterTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,59 @@ | ||||||
<?xml version="1.0" encoding="UTF-8"?> | ||||||
<!-- | ||||||
/** | ||||||
* Copyright © Magento, Inc. All rights reserved. | ||||||
* See COPYING.txt for license details. | ||||||
*/ | ||||||
--> | ||||||
|
||||||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||||||
<test name="AdminMediaGalleryDisabledContentFilterTest"> | ||||||
<annotations> | ||||||
<features value="MediaGallery"/> | ||||||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1464"/> | ||||||
<title value="User filter asset by disabled content"/> | ||||||
<stories value="Story 57: User filters images by the area they used in"/> | ||||||
<testCaseId value="to-be-added"/> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
<description value="User filter asset by disabled content"/> | ||||||
<severity value="CRITICAL"/> | ||||||
<group value="media_gallery_ui"/> | ||||||
</annotations> | ||||||
<before> | ||||||
<createData entity="SimpleSubCategory" stepKey="category"/> | ||||||
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> | ||||||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||||||
</before> | ||||||
<after> | ||||||
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> | ||||||
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> | ||||||
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> | ||||||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||||||
</after> | ||||||
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> | ||||||
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> | ||||||
<argument name="category" value="$$category$$"/> | ||||||
</actionGroup> | ||||||
<actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> | ||||||
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> | ||||||
<argument name="image" value="ImageUpload"/> | ||||||
</actionGroup> | ||||||
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> | ||||||
<argument name="imageName" value="{{ImageUpload.file}}"/> | ||||||
</actionGroup> | ||||||
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedImage"/> | ||||||
<actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> | ||||||
<scrollToTopOfPage stepKey="scrollToTop"/> | ||||||
<actionGroup ref="AdminEnableCategoryActionGroup" stepKey="disableCategory"/> | ||||||
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> | ||||||
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> | ||||||
<actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> | ||||||
<actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> | ||||||
<argument name="selectLabel" value="Content Status"/> | ||||||
<argument name="selectOption" value="Disabled"/> | ||||||
</actionGroup> | ||||||
<actionGroup ref="AdminEnhancedMediaGalleryApplyFiltersActionGroup" stepKey="applyFilters"/> | ||||||
<actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> | ||||||
<argument name="image" value="ImageUpload"/> | ||||||
</actionGroup> | ||||||
</test> | ||||||
</tests> |
57 changes: 57 additions & 0 deletions
57
MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryEnabledContentFilterTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminMediaGalleryEnabledContentFilterTest"> | ||
<annotations> | ||
<features value="MediaGallery"/> | ||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1464"/> | ||
<title value="User filter asset by enabled content"/> | ||
<stories value="Story 57: User filters images by the area they used in"/> | ||
<testCaseId value="to-be-added"/> | ||
<description value="User filter asset by enabled content"/> | ||
<severity value="CRITICAL"/> | ||
<group value="media_gallery_ui"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="category"/> | ||
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> | ||
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> | ||
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
</after> | ||
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> | ||
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> | ||
<argument name="category" value="$$category$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> | ||
<argument name="imageName" value="{{ImageUpload.file}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedImage"/> | ||
<actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> | ||
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> | ||
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> | ||
<actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> | ||
<argument name="selectLabel" value="Content Status"/> | ||
<argument name="selectOption" value="Enabled"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminEnhancedMediaGalleryApplyFiltersActionGroup" stepKey="applyFilters"/> | ||
<actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
55 changes: 55 additions & 0 deletions
55
MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryStoreViewContentFilterTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminMediaGalleryStoreViewContentFilterTest"> | ||
gabrieldagama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<annotations> | ||
<features value="MediaGallery"/> | ||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1464"/> | ||
<title value="User filter asset by content store view"/> | ||
<stories value="Story 57: User filters images by the area they used in"/> | ||
<testCaseId value="to-be-added"/> | ||
<description value="User filter asset by content store view"/> | ||
<severity value="CRITICAL"/> | ||
<group value="media_gallery_ui"/> | ||
</annotations> | ||
<before> | ||
<createData entity="_defaultCmsPage" stepKey="createCMSPage" /> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> | ||
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> | ||
<deleteData createDataKey="createCMSPage" stepKey="deleteCmsPage"/> | ||
</after> | ||
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage"> | ||
<argument name="CMSPage" value="$$createCMSPage$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminOpenMediaGalleryForExistingPageNoEditorActionGroup" stepKey="openMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> | ||
<argument name="imageName" value="{{ImageUpload.file}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedImage"/> | ||
<scrollToTopOfPage stepKey="scrollToTop"/> | ||
<click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSavePage"/> | ||
<waitForPageLoad stepKey="waitForPageSave"/> | ||
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> | ||
<actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> | ||
<argument name="selectLabel" value="Store View"/> | ||
<argument name="selectOption" value="Main Website/Main Website Store/Default Store View"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminEnhancedMediaGalleryApplyFiltersActionGroup" stepKey="applyFilters"/> | ||
<actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
27 changes: 27 additions & 0 deletions
27
MediaGalleryUi/Ui/Component/Listing/Filters/Options/Status.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\MediaGalleryUi\Ui\Component\Listing\Filters\Options; | ||
|
||
use Magento\Framework\Data\OptionSourceInterface; | ||
|
||
/** | ||
* Status filter options | ||
*/ | ||
class Status implements OptionSourceInterface | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function toOptionArray(): array | ||
{ | ||
return [ | ||
['value' => '1', 'label' => __('Enabled')], | ||
['value' => '0', 'label' => __('Disabled')] | ||
]; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
MediaGalleryUi/Ui/Component/Listing/Filters/Options/Store.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\MediaGalleryUi\Ui\Component\Listing\Filters\Options; | ||
|
||
use Magento\Store\Ui\Component\Listing\Column\Store\Options as StoreOptions; | ||
|
||
/** | ||
* Store Options for content field | ||
*/ | ||
class Store extends StoreOptions | ||
{ | ||
/** | ||
* All Store Views value | ||
*/ | ||
const ALL_STORE_VIEWS = '0'; | ||
|
||
/** | ||
* Get options | ||
* | ||
* @return array | ||
*/ | ||
public function toOptionArray() | ||
{ | ||
if ($this->options !== null) { | ||
return $this->options; | ||
} | ||
|
||
$this->currentOptions['All Store Views']['label'] = __('All Store Views'); | ||
$this->currentOptions['All Store Views']['value'] = self::ALL_STORE_VIEWS; | ||
|
||
$this->generateCurrentOptions(); | ||
|
||
$this->options = array_values($this->currentOptions); | ||
|
||
return $this->options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of inconsistency: there is a constant for the table name but no constant for
id
field name. I'd have both on none