Skip to content

Commit

Permalink
DEPS + fix morph in factory
Browse files Browse the repository at this point in the history
  • Loading branch information
rxcod9 committed Aug 31, 2023
1 parent dc399f1 commit d4e870c
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}],
"require": {
"php": "^7.3|^8.0|^9.0",
"illuminate/support": "^7|^8|^9",
"illuminate/support": "^7|^8|^9|^10",
"joy/voyager-core": "^1.0",
"tcg/voyager": "^1.4"
},
Expand All @@ -30,8 +30,8 @@
"friendsofphp/php-cs-fixer": "^3.0",
"guzzlehttp/guzzle": "^6.3|^7.0",
"mockery/mockery": "^1.3",
"orchestra/testbench": "^5.0|^6.0|^7.0",
"phpunit/phpunit": "^9.1"
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",
"phpunit/phpunit": "^9.1|^10.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions database/factories/AodIndexeventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AodIndexeventFactory extends Factory
public function definition()
{
$recordType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Expand All @@ -50,7 +50,7 @@ public function definition()
'error' => $this->faker->text(50),
'success' => $this->faker->boolean(),
'record_module' => $recordType,
'record_id' => optional($recordType)->factory(),
'record_id' => (new $recordType)->factory(),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
// 'deleted_at' => $this->faker->dateTime(),
Expand Down
4 changes: 2 additions & 2 deletions database/factories/AosLineItemGroupFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AosLineItemGroupFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('AosQuote') => 'Quote',
Voyager::modelClass('AosInvoice') => 'Invoice',
Voyager::modelClass('AosContract') => 'Contract',
Expand All @@ -45,7 +45,7 @@ public function definition()
'total_amount' => $this->faker->randomFloat(6),
'total_amount_usdollar' => $this->faker->randomFloat(6),
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'number' => $this->faker->numberBetween(1, 100),
'currency_id' => null,
'created_at' => $this->faker->dateTime(),
Expand Down
4 changes: 2 additions & 2 deletions database/factories/AosProductsQuoteFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AosProductsQuoteFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Expand Down Expand Up @@ -69,7 +69,7 @@ public function definition()
'product_total_price_usdollar' => $this->faker->randomFloat(2),
'vat' => $this->faker->text(50),
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'product_id' => null,
'group_id' => null,
'created_at' => $this->faker->dateTime(),
Expand Down
4 changes: 2 additions & 2 deletions database/factories/AowProcessedFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AowProcessedFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Expand All @@ -49,7 +49,7 @@ public function definition()
'description' => $this->faker->text(500),
'aow_workflow_id' => null,
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'status' => $this->faker->randomKey([
'Complete' => 'Complete',
'Running' => 'Running',
Expand Down
4 changes: 2 additions & 2 deletions database/factories/CallFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CallFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Contact') => 'Contact',
Voyager::modelClass('Task') => 'Task',
Expand Down Expand Up @@ -52,7 +52,7 @@ public function definition()
'date_start' => $this->faker->dateTimeBetween('-3months', '-2months'),
'date_end' => $this->faker->dateTimeBetween('-2months', '-1month'),
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'status' => $this->faker->randomKey([
'Planned' => 'Planned',
'Held' => 'Held',
Expand Down
4 changes: 2 additions & 2 deletions database/factories/EmailFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class EmailFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Expand Down Expand Up @@ -73,7 +73,7 @@ public function definition()
'intent' => $this->faker->text('10'),
'mailbox_id' => null,
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'uid' => null,
'category_id' => $this->faker->randomKey([
'' => 'None',
Expand Down
4 changes: 2 additions & 2 deletions database/factories/EmailsBeanFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class EmailsBeanFactory extends Factory
public function definition()
{
$beanType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Expand All @@ -34,7 +34,7 @@ public function definition()
return [
'email_id' => null,
'bean_module' => $beanType,
'bean_id' => optional($beanType)->factory(),
'bean_id' => (new $beanType)->factory(),
'campaign_data' => $this->faker->paragraphs(10, true),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
Expand Down
4 changes: 2 additions & 2 deletions database/factories/FavoriteFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FavoriteFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Contact') => 'Contact',
Voyager::modelClass('Task') => 'Task',
Expand All @@ -48,7 +48,7 @@ public function definition()
'name' => $this->faker->name(),
'description' => $this->faker->text(500),
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
// 'deleted_at' => $this->faker->dateTime(),
Expand Down
4 changes: 2 additions & 2 deletions database/factories/JjwgMapFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class JjwgMapFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Expand Down Expand Up @@ -54,7 +54,7 @@ public function definition()
]),
'module_type' => null,
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
// 'deleted_at' => $this->faker->dateTime(),
Expand Down
4 changes: 2 additions & 2 deletions database/factories/MeetingFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MeetingFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Contact') => 'Contact',
Voyager::modelClass('Task') => 'Task',
Expand Down Expand Up @@ -59,7 +59,7 @@ public function definition()
'date_start' => $this->faker->dateTimeBetween('-1month', 'now'),
'date_end' => $this->faker->dateTimeBetween('-1month', '+1month'),
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'status' => $this->faker->randomKey(
config('joy-voyager-crm.meetings.statuses', [
'Planned' => 'Planned',
Expand Down
4 changes: 2 additions & 2 deletions database/factories/NoteFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class NoteFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Contact') => 'Contact',
Voyager::modelClass('Opportunity') => 'Opportunity',
Expand Down Expand Up @@ -54,7 +54,7 @@ public function definition()
'file_mime_type' => $this->faker->text(50),
'filename' => $this->faker->text(50),
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'contact_id' => null,
'portal_flag' => $this->faker->boolean(),
'embed_flag' => $this->faker->boolean(),
Expand Down
4 changes: 2 additions & 2 deletions database/factories/SecuritygroupsRecordFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SecuritygroupsRecordFactory extends Factory
public function definition()
{
$recordType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Expand All @@ -47,7 +47,7 @@ public function definition()
return [
'securitygroup_id' => null,
'module' => $recordType,
'record_id' => optional($recordType)->factory(),
'record_id' => (new $recordType)->factory(),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
// 'deleted_at' => $this->faker->dateTime(),
Expand Down
4 changes: 2 additions & 2 deletions database/factories/TaskFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TaskFactory extends Factory
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Contact') => 'Contact',
Voyager::modelClass('Task') => 'Task',
Expand Down Expand Up @@ -52,7 +52,7 @@ public function definition()
'date_start_flag' => $this->faker->boolean(),
'date_start' => $this->faker->dateTimeBetween('-1month', 'now')->format('Y-m-d'),
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'parent_id' => (new $parentType)->factory(),
'contact_id' => null,
'priority' => $this->faker->randomKey([
'Low' => 'Low',
Expand Down
4 changes: 2 additions & 2 deletions database/factories/UsersLastImportFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UsersLastImportFactory extends Factory
public function definition()
{
$beanType = $this->faker->randomKey([
'' => 'None',
// '' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Expand All @@ -47,7 +47,7 @@ public function definition()
return [
'import_module' => $this->faker->word(),
'bean_type' => $beanType,
'bean_id' => optional($beanType)->factory(),
'bean_id' => (new $beanType)->factory(),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
// 'deleted_at' => $this->faker->dateTime(),
Expand Down

0 comments on commit d4e870c

Please sign in to comment.