Skip to content

Commit

Permalink
Merge pull request #407 from canyongbs/chore/seeding
Browse files Browse the repository at this point in the history
[Chore] Update seeders to better reflect environment
  • Loading branch information
Orrison authored Dec 28, 2023
2 parents 7fb3c0e + aa1ec54 commit 242cc66
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function definition(): array
'serial_number' => fake()->isbn13(),
'name' => fake()->catchPhrase(),
'description' => fake()->paragraph(),
'type_id' => AssetType::factory(),
'status_id' => AssetStatus::factory(),
'location_id' => AssetLocation::factory(),
'type_id' => AssetType::inRandomOrder()->first(),
'status_id' => AssetStatus::inRandomOrder()->first(),
'location_id' => AssetLocation::inRandomOrder()->first(),
'purchase_date' => fake()->dateTime(),
];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

/*
<COPYRIGHT>
Copyright © 2022-2023, Canyon GBS LLC. All rights reserved.
Advising App™ is licensed under the Elastic License 2.0. For more details,
see https://github.com/canyongbs/advisingapp/blob/main/LICENSE.
Notice:
- You may not provide the software to third parties as a hosted or managed
service, where the service provides users with access to any substantial set of
the features or functionality of the software.
- You may not move, change, disable, or circumvent the license key functionality
in the software, and you may not remove or obscure any functionality in the
software that is protected by the license key.
- You may not alter, remove, or obscure any licensing, copyright, or other notices
of the licensor in the software. Any use of the licensor’s trademarks is subject
to applicable law.
- Canyon GBS LLC respects the intellectual property rights of others and expects the
same in return. Canyon GBS™ and Advising App™ are registered trademarks of
Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks
vigorously.
- The software solution, including services, infrastructure, and code, is offered as a
Software as a Service (SaaS) by Canyon GBS LLC.
- Use of this software implies agreement to the license terms and conditions as stated
in the Elastic License 2.0.
For more information or inquiries please visit our website at
https://www.canyongbs.com or contact us via email at [email protected].
</COPYRIGHT>
*/

namespace AdvisingApp\InventoryManagement\Database\Seeders;

use Illuminate\Database\Seeder;
use AdvisingApp\InventoryManagement\Models\MaintenanceProvider;

class MaintenanceProviderSeeder extends Seeder
{
public function run(): void
{
MaintenanceProvider::factory()
->count(15)
->create();
}
}
5 changes: 4 additions & 1 deletion database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
use AdvisingApp\Application\Database\Seeders\ApplicationSubmissionStateSeeder;
use AdvisingApp\ServiceManagement\Database\Seeders\ServiceRequestStatusSeeder;
use AdvisingApp\ServiceManagement\Database\Seeders\ServiceRequestUpdateSeeder;
use AdvisingApp\InventoryManagement\Database\Seeders\MaintenanceProviderSeeder;
use AdvisingApp\ServiceManagement\Database\Seeders\ServiceRequestPrioritySeeder;

class DatabaseSeeder extends Seeder
Expand Down Expand Up @@ -106,8 +107,10 @@ public function run(): void
StudentSeeder::class,
ApplicationSubmissionStateSeeder::class,
EventSeeder::class,
AssetSeeder::class,
// InventoryManagement
...AssetSeeder::metadataSeeders(),
AssetSeeder::class,
MaintenanceProviderSeeder::class,
]);
}
}
6 changes: 6 additions & 0 deletions database/seeders/DemoDatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@
use AdvisingApp\Prospect\Database\Seeders\ProspectSourceSeeder;
use AdvisingApp\Prospect\Database\Seeders\ProspectStatusSeeder;
use AdvisingApp\Consent\Database\Seeders\ConsentAgreementSeeder;
use AdvisingApp\InventoryManagement\Database\Seeders\AssetSeeder;
use AdvisingApp\Authorization\Console\Commands\SyncRolesAndPermissions;
use AdvisingApp\KnowledgeBase\Database\Seeders\KnowledgeBaseStatusSeeder;
use AdvisingApp\KnowledgeBase\Database\Seeders\KnowledgeBaseQualitySeeder;
use AdvisingApp\KnowledgeBase\Database\Seeders\KnowledgeBaseCategorySeeder;
use AdvisingApp\ServiceManagement\Database\Seeders\ServiceRequestTypeSeeder;
use AdvisingApp\Application\Database\Seeders\ApplicationSubmissionStateSeeder;
use AdvisingApp\ServiceManagement\Database\Seeders\ServiceRequestStatusSeeder;
use AdvisingApp\InventoryManagement\Database\Seeders\MaintenanceProviderSeeder;
use AdvisingApp\ServiceManagement\Database\Seeders\ServiceRequestPrioritySeeder;

class DemoDatabaseSeeder extends Seeder
Expand Down Expand Up @@ -77,6 +79,10 @@ public function run(): void
ConsentAgreementSeeder::class,
PronounsSeeder::class,
ApplicationSubmissionStateSeeder::class,
// InventoryManagement
...AssetSeeder::metadataSeeders(),
AssetSeeder::class,
MaintenanceProviderSeeder::class,
]);
}
}

0 comments on commit 242cc66

Please sign in to comment.