2020-08-26 17:53:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Destructr\Factory;
|
|
|
|
|
|
|
|
class ExampleFactory extends Factory {
|
|
|
|
/**
|
2020-08-29 21:28:45 +00:00
|
|
|
* Example factory with a different schema, to index on random_data, but not
|
|
|
|
* by dso_type.
|
|
|
|
*
|
|
|
|
* Also uses a different column name for dso.id
|
2020-08-26 17:53:27 +00:00
|
|
|
*/
|
2020-08-29 21:28:45 +00:00
|
|
|
protected $schema = [
|
2020-08-26 17:53:27 +00:00
|
|
|
'dso.id' => [
|
2020-08-29 21:28:45 +00:00
|
|
|
'name'=>'dso_id_other_name',
|
2020-08-26 17:53:27 +00:00
|
|
|
'type'=>'VARCHAR(16)',
|
|
|
|
'index' => 'BTREE',
|
|
|
|
'unique' => true,
|
|
|
|
'primary' => true
|
|
|
|
],
|
|
|
|
'dso.deleted' => [
|
|
|
|
'name'=>'dso_deleted',
|
2020-08-29 21:28:45 +00:00
|
|
|
'type'=>'INT',
|
2020-08-26 17:53:27 +00:00
|
|
|
'index'=>'BTREE'
|
|
|
|
],
|
2020-08-29 21:28:45 +00:00
|
|
|
'random_data' => [
|
|
|
|
'name'=>'random_data',
|
2020-08-26 17:53:27 +00:00
|
|
|
'type'=>'VARCHAR(100)',
|
|
|
|
'index'=>'BTREE'
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|