Skip to content

Commit

Permalink
add demo seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban Siffer committed Apr 27, 2023
1 parent 5ebd1a5 commit bd3028b
Show file tree
Hide file tree
Showing 95 changed files with 12,677 additions and 1 deletion.
99 changes: 98 additions & 1 deletion database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,109 @@ class DatabaseSeeder extends Seeder
{
public function run()
{
// default seeder
$this->call([
PermissionsTableSeeder::class,
RolesTableSeeder::class,
PermissionRoleTableSeeder::class,
UsersTableSeeder::class,
RoleUserTableSeeder::class,
]);
if (env("USE_DEMO_DATA", false)) {
$this->call(DemoMigrationsTableSeeder::class);
$this->call(DemoOauthAuthCodesTableSeeder::class);
$this->call(DemoOauthAccessTokensTableSeeder::class);
$this->call(DemoOauthRefreshTokensTableSeeder::class);
$this->call(DemoOauthClientsTableSeeder::class);
$this->call(DemoOauthPersonalAccessClientsTableSeeder::class);
$this->call(DemoActivityProcessTableSeeder::class);
$this->call(DemoActorOperationTableSeeder::class);
$this->call(DemoApplicationBlocksTableSeeder::class);
$this->call(DemoActorsTableSeeder::class);
$this->call(DemoAnnuairesTableSeeder::class);
$this->call(DemoApplicationModuleApplicationServiceTableSeeder::class);
$this->call(DemoApplicationServiceMApplicationTableSeeder::class);
$this->call(DemoAuditLogsTableSeeder::class);
$this->call(DemoBuildingsTableSeeder::class);
$this->call(DemoApplicationModulesTableSeeder::class);
$this->call(DemoBaysTableSeeder::class);
$this->call(DemoBayWifiTerminalTableSeeder::class);
$this->call(DemoDatabaseInformationTableSeeder::class);
$this->call(DemoDhcpServersTableSeeder::class);
$this->call(DemoDatabaseMApplicationTableSeeder::class);
$this->call(DemoEntityMApplicationTableSeeder::class);
$this->call(DemoDomaineAdsTableSeeder::class);
$this->call(DemoEntityProcessTableSeeder::class);
$this->call(DemoInformationProcessTableSeeder::class);
$this->call(DemoFluxesTableSeeder::class);
$this->call(DemoForestAdsTableSeeder::class);
$this->call(DemoLanWanTableSeeder::class);
$this->call(DemoLansTableSeeder::class);
$this->call(DemoGatewaysTableSeeder::class);
$this->call(DemoLogicalServerPhysicalServerTableSeeder::class);
$this->call(DemoMansTableSeeder::class);
$this->call(DemoMediaTableSeeder::class);
$this->call(DemoLogicalServersTableSeeder::class);
$this->call(DemoMApplicationProcessTableSeeder::class);
$this->call(DemoManWanTableSeeder::class);
$this->call(DemoOperationsTableSeeder::class);
$this->call(DemoNetworkSwitchesTableSeeder::class);
$this->call(DemoPasswordResetsTableSeeder::class);
$this->call(DemoPermissionsTableSeeder::class);
$this->call(DemoOperationTaskTableSeeder::class);
$this->call(DemoPeripheralsTableSeeder::class);
$this->call(DemoNetworksTableSeeder::class);
$this->call(DemoPhysicalSecurityDevicesTableSeeder::class);
$this->call(DemoPhysicalRouterVlanTableSeeder::class);
$this->call(DemoSitesTableSeeder::class);
$this->call(DemoRoleUserTableSeeder::class);
$this->call(DemoRoutersTableSeeder::class);
$this->call(DemoRolesTableSeeder::class);
$this->call(DemoRelationsTableSeeder::class);
$this->call(DemoTasksTableSeeder::class);
$this->call(DemoVlansTableSeeder::class);
$this->call(DemoUsersTableSeeder::class);
$this->call(DemoWansTableSeeder::class);
$this->call(DemoActivityOperationTableSeeder::class);
$this->call(DemoZoneAdminsTableSeeder::class);
$this->call(DemoApplicationServicesTableSeeder::class);
$this->call(DemoDatabaseEntityTableSeeder::class);
$this->call(DemoDomaineAdForestAdTableSeeder::class);
$this->call(DemoLanManTableSeeder::class);
$this->call(DemoLogicalServerMApplicationTableSeeder::class);
$this->call(DemoPermissionRoleTableSeeder::class);
$this->call(DemoMacroProcessusesTableSeeder::class);
$this->call(DemoProcessesTableSeeder::class);
$this->call(DemoCertificatesTableSeeder::class);
$this->call(DemoMApplicationsTableSeeder::class);
$this->call(DemoCertificateMApplicationTableSeeder::class);
$this->call(DemoInformationTableSeeder::class);
$this->call(DemoDatabasesTableSeeder::class);
$this->call(DemoCertificateLogicalServerTableSeeder::class);
$this->call(DemoEntitiesTableSeeder::class);
$this->call(DemoSubnetworksTableSeeder::class);
$this->call(DemoDnsserversTableSeeder::class);
$this->call(DemoCartographerMApplicationTableSeeder::class);
$this->call(DemoMApplicationEventsTableSeeder::class);
$this->call(DemoMApplicationWorkstationTableSeeder::class);
$this->call(DemoExternalConnectedEntitiesTableSeeder::class);
$this->call(DemoDatabaseLogicalServerTableSeeder::class);
$this->call(DemoWorkstationsTableSeeder::class);
$this->call(DemoPhysicalLinksTableSeeder::class);
$this->call(DemoCpeVendorsTableSeeder::class);
$this->call(DemoCpeProductsTableSeeder::class);
$this->call(DemoActivitiesTableSeeder::class);
$this->call(DemoActivityDocumentTableSeeder::class);
$this->call(DemoDocumentsTableSeeder::class);
$this->call(DemoEntityDocumentTableSeeder::class);
$this->call(DemoCpeVersionsTableSeeder::class);
$this->call(DemoPhysicalSwitchesTableSeeder::class);
$this->call(DemoPhysicalRoutersTableSeeder::class);
$this->call(DemoWifiTerminalsTableSeeder::class);
$this->call(DemoPhonesTableSeeder::class);
$this->call(DemoSecurityDevicesTableSeeder::class);
$this->call(DemoPhysicalServersTableSeeder::class);
$this->call(DemoStorageDevicesTableSeeder::class);
}
}
}
}
202 changes: 202 additions & 0 deletions database/seeders/DemoActivitiesTableSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class DemoActivitiesTableSeeder extends Seeder
{

/**
* Auto generated seed file
*
* @return void
*/
public function run()
{


\DB::table('activities')->delete();

\DB::table('activities')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Activité 1',
'description' => '<p>Description de l\'activité 1</p>',
'created_at' => '2020-06-10 15:20:42',
'updated_at' => '2020-06-10 15:20:42',
'deleted_at' => NULL,
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
1 =>
array (
'id' => 2,
'name' => 'Activité 2',
'description' => '<p>Description de l\'activité de test</p>',
'created_at' => '2020-06-10 17:44:26',
'updated_at' => '2020-06-13 06:03:26',
'deleted_at' => NULL,
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
2 =>
array (
'id' => 3,
'name' => 'Activité 3',
'description' => '<p>Description de l\'activité 3</p>',
'created_at' => '2020-06-13 06:57:08',
'updated_at' => '2020-06-13 06:57:08',
'deleted_at' => NULL,
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
3 =>
array (
'id' => 4,
'name' => 'Activité 4',
'description' => '<p>Description de l\'acivité 4</p>',
'created_at' => '2020-06-13 06:57:24',
'updated_at' => '2020-06-13 06:57:24',
'deleted_at' => NULL,
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
4 =>
array (
'id' => 5,
'name' => 'Activité principale',
'description' => '<p>Description de l\'activité principale</p>',
'created_at' => '2020-08-15 06:19:53',
'updated_at' => '2020-08-15 06:19:53',
'deleted_at' => NULL,
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
5 =>
array (
'id' => 6,
'name' => 'AAA',
'description' => 'test a1',
'created_at' => '2021-03-22 20:06:55',
'updated_at' => '2021-03-22 20:07:00',
'deleted_at' => '2021-03-22 20:07:00',
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
6 =>
array (
'id' => 7,
'name' => 'AAA',
'description' => 'test AAA',
'created_at' => '2021-03-22 20:13:43',
'updated_at' => '2021-03-22 20:14:05',
'deleted_at' => '2021-03-22 20:14:05',
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
7 =>
array (
'id' => 8,
'name' => 'AAA',
'description' => 'test 2 aaa',
'created_at' => '2021-03-22 20:14:16',
'updated_at' => '2021-03-22 20:14:45',
'deleted_at' => '2021-03-22 20:14:45',
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
8 =>
array (
'id' => 9,
'name' => 'AAA1',
'description' => 'test 3 AAA',
'created_at' => '2021-03-22 20:14:40',
'updated_at' => '2021-03-22 20:19:09',
'deleted_at' => '2021-03-22 20:19:09',
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
9 =>
array (
'id' => 10,
'name' => 'Activité 0',
'description' => '<p>Description de l\'activité zéro</p>',
'created_at' => NULL,
'updated_at' => '2021-05-15 09:40:16',
'deleted_at' => NULL,
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
10 =>
array (
'id' => 11,
'name' => 'test',
'description' => 'dqqsd',
'created_at' => '2021-08-02 22:03:46',
'updated_at' => '2021-09-22 12:59:48',
'deleted_at' => '2021-09-22 12:59:48',
'responsible' => NULL,
'purpose' => NULL,
'categories' => NULL,
'recipients' => NULL,
'transfert' => NULL,
'retention' => NULL,
'controls' => NULL,
),
));


}
}
24 changes: 24 additions & 0 deletions database/seeders/DemoActivityDocumentTableSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class DemoActivityDocumentTableSeeder extends Seeder
{

/**
* Auto generated seed file
*
* @return void
*/
public function run()
{


\DB::table('activity_document')->delete();



}
}
Loading

0 comments on commit bd3028b

Please sign in to comment.