-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elevation: Change field name to text worked for elevation
Model: Elevation and Items
- Loading branch information
Showing
6 changed files
with
89 additions
and
15 deletions.
There are no files selected for viewing
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
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
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
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
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 | ||
|
||
namespace Firesphere\SolrSearch\Models; | ||
|
||
use SilverStripe\ORM\DataObject; | ||
|
||
class ElevatedItem extends DataObject | ||
{ | ||
private static $table_name = 'ElevatedItem'; | ||
|
||
private static $db = [ | ||
'Rank' => 'Int', | ||
'SolrID' => 'Varchar(255)', | ||
'Include' => 'Boolean(1)', | ||
'Exclude' => 'Boolean(0)', | ||
]; | ||
|
||
private static $has_one = [ | ||
'Record' => DataObject::class, | ||
]; | ||
|
||
private static $belongs_many_many = [ | ||
'Keywords' => Elevation::class, | ||
]; | ||
|
||
private static $summary_fields = ['ID', 'Rank', 'SolrID', 'Include', 'Exclude']; | ||
} |
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,21 @@ | ||
<?php | ||
|
||
namespace Firesphere\SolrSearch\Models; | ||
|
||
use SilverStripe\ORM\DataObject; | ||
|
||
class Elevation extends DataObject | ||
{ | ||
private static $table_name = 'Elevation'; | ||
|
||
private static $db = [ | ||
'Keyword' => 'Varchar(255)', | ||
]; | ||
|
||
private static $many_many = [ | ||
'Items' => ElevatedItem::class, | ||
]; | ||
|
||
private static $summary_fields = ['ID', 'Keyword']; | ||
} | ||
|