refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
39
database/factories/RelationshipFactory.php
Normal file
39
database/factories/RelationshipFactory.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
$factory->define(App\Models\Relationship\Relationship::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'account_id' => factory(App\Models\Account\Account::class)->create()->id,
|
||||
'relationship_type_id' => function (array $data) {
|
||||
return factory(App\Models\Relationship\RelationshipType::class)->create([
|
||||
'account_id' => $data['account_id'],
|
||||
])->id;
|
||||
},
|
||||
'contact_is' => function (array $data) {
|
||||
return factory(App\Models\Contact\Contact::class)->create([
|
||||
'account_id' => $data['account_id'],
|
||||
])->id;
|
||||
},
|
||||
'of_contact' => function (array $data) {
|
||||
return factory(App\Models\Contact\Contact::class)->create([
|
||||
'account_id' => $data['account_id'],
|
||||
])->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(App\Models\Relationship\RelationshipType::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'account_id' => factory(App\Models\Account\Account::class)->create()->id,
|
||||
'relationship_type_group_id' => function (array $data) {
|
||||
return factory(App\Models\Relationship\RelationshipTypeGroup::class)->create([
|
||||
'account_id' => $data['account_id'],
|
||||
])->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(App\Models\Relationship\RelationshipTypeGroup::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'account_id' => factory(App\Models\Account\Account::class)->create()->id,
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user