283 lines
9.6 KiB
PHP
283 lines
9.6 KiB
PHP
|
|
<?php
|
|||
|
|
|
|||
|
|
namespace Database\Seeders;
|
|||
|
|
|
|||
|
|
use App\Models\CompanyActivity;
|
|||
|
|
use App\Models\CompanySector;
|
|||
|
|
use App\Models\DocumentCategory;
|
|||
|
|
use App\Models\DocumentTag;
|
|||
|
|
use Illuminate\Database\Seeder;
|
|||
|
|
|
|||
|
|
class CustomSeeder extends Seeder
|
|||
|
|
{
|
|||
|
|
/**
|
|||
|
|
* Run the database seeds.
|
|||
|
|
*
|
|||
|
|
* @return void
|
|||
|
|
*/
|
|||
|
|
public function run(): void
|
|||
|
|
{
|
|||
|
|
// php artisan db:seed --class=CustomSeeder
|
|||
|
|
$this->companyActivitySeeder();
|
|||
|
|
$this->companySectorSeeder();
|
|||
|
|
$this->documentCategorySeeder();
|
|||
|
|
$this->documentTagSeeder();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Set custom company activity seeder.
|
|||
|
|
*
|
|||
|
|
* @return void
|
|||
|
|
*/
|
|||
|
|
private function companyActivitySeeder(): void
|
|||
|
|
{
|
|||
|
|
// Set FR values.
|
|||
|
|
app()->setLocale("fr");
|
|||
|
|
$firstActivity = CompanyActivity::create([
|
|||
|
|
"name" => "Amont",
|
|||
|
|
"color" => "#6fbc45",
|
|||
|
|
"published" => 1,
|
|||
|
|
]);
|
|||
|
|
$secondActivity = CompanyActivity::create([
|
|||
|
|
"name" => "International",
|
|||
|
|
"color" => "#b24881",
|
|||
|
|
"published" => 1,
|
|||
|
|
]);
|
|||
|
|
$thirdActivity = CompanyActivity::create([
|
|||
|
|
"name" => "Plateformes",
|
|||
|
|
"color" => "#6d6d6d",
|
|||
|
|
"published" => 1,
|
|||
|
|
]);
|
|||
|
|
$fourthActivity = CompanyActivity::create([
|
|||
|
|
"name" => "Traiteur",
|
|||
|
|
"color" => "#f29100",
|
|||
|
|
"published" => 1,
|
|||
|
|
]);
|
|||
|
|
$fifthActivity = CompanyActivity::create([
|
|||
|
|
"name" => "Volaille",
|
|||
|
|
"color" => "#DC2034",
|
|||
|
|
"published" => 1,
|
|||
|
|
]);
|
|||
|
|
|
|||
|
|
// Set EN values.
|
|||
|
|
app()->setLocale("en");
|
|||
|
|
$firstActivity->update([
|
|||
|
|
"name" => "Upstream",
|
|||
|
|
]);
|
|||
|
|
$secondActivity->update([
|
|||
|
|
"name" => "International",
|
|||
|
|
]);
|
|||
|
|
$thirdActivity->update([
|
|||
|
|
"name" => "Platforms",
|
|||
|
|
]);
|
|||
|
|
$fourthActivity->update([
|
|||
|
|
"name" => "Catering",
|
|||
|
|
]);
|
|||
|
|
$fifthActivity->update([
|
|||
|
|
"name" => "Poultry",
|
|||
|
|
]);
|
|||
|
|
|
|||
|
|
// Set locale to the fallback.
|
|||
|
|
app()->setLocale(config('app.fallback_locale'));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Set custom company sector seeder.
|
|||
|
|
*
|
|||
|
|
* @return void
|
|||
|
|
*/
|
|||
|
|
private function companySectorSeeder(): void
|
|||
|
|
{
|
|||
|
|
collect([
|
|||
|
|
"Allemagne - ECF - Clements BETTERMANN",
|
|||
|
|
"Angleterre - Capestone - Rob Cumine",
|
|||
|
|
"Belgique - Kiplama - Toon KWEENS",
|
|||
|
|
"Hongrie et Roumanie - Ákos Szabó",
|
|||
|
|
"Pologne - Adam Sojka",
|
|||
|
|
"Pôle Amont - Filière Céréales - Gaël Le Conte",
|
|||
|
|
"Pôle Amont - Filière Oeufs - Christophe Bériard",
|
|||
|
|
"Pôle Amont - Filière Spécialités - Didier Richard",
|
|||
|
|
"Pôle Amont - Filière Vif - Stéphane Landreau",
|
|||
|
|
"Pôle Amont - Filière accouvage - Olivier Sionneau",
|
|||
|
|
"Pôle Traiteur - Crêpes et galettes - Christèle Lucas",
|
|||
|
|
"Pôle Traiteur - La Toque Angevine - Pierre Lonjon",
|
|||
|
|
"Pôle Traiteur - Pizzas, tartes, sandwiches et quiches - Yann Gomez",
|
|||
|
|
"Pôle Traiteur - Plats cuisinés : Marie, Traditions d’Asie, Weight Watchers - Guillaume LETENNEUR",
|
|||
|
|
"Pôle Traiteur - Plats cuisinés et produits exotiques - Benjamin Montlahuc",
|
|||
|
|
"Pôle Traiteur - Restauration Hors Domicile - Ludovic Courtier",
|
|||
|
|
"Pôle Traiteur - Surgelés - Didier Gand",
|
|||
|
|
"Pôle Volaille - Cailles Robin - Guy Prod’homme",
|
|||
|
|
"Pôle Volaille - GPA Distribution Paris - Thierry Lambert",
|
|||
|
|
"Pôle Volaille - Hauts de France",
|
|||
|
|
"Pôle Volaille - LDC Aquitaine - Denis Bordes",
|
|||
|
|
"Pôle Volaille - LDC Foods - Mickaël Rio",
|
|||
|
|
"Pôle Volaille - LDC TERRAVENIR - Christophe Pajot",
|
|||
|
|
"Pôle Volaille - PFC - Dominique Théreau",
|
|||
|
|
"Pôle Volaille - Société Arrivé - Roland Tonarelli",
|
|||
|
|
"Pôle Volaille - Société Bretonne de Volaille - Laurent Girard",
|
|||
|
|
"Pôle Volaille - Société Favreau Couthouis - Roland Tonarelli",
|
|||
|
|
"Pôle Volaille - VOLENA - Arnaud Boinard",
|
|||
|
|
"Pôle volaille - Pôle VDR - Philippe Aubert",
|
|||
|
|
])->map(function (string $sector) {
|
|||
|
|
CompanySector::create([
|
|||
|
|
"name" => $sector,
|
|||
|
|
"published" => 1,
|
|||
|
|
]);
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Set custom document category seeder.
|
|||
|
|
*
|
|||
|
|
* @return void
|
|||
|
|
*/
|
|||
|
|
private function documentCategorySeeder(): void
|
|||
|
|
{
|
|||
|
|
// Set FR values.
|
|||
|
|
app()->setLocale("fr");
|
|||
|
|
$docs = DocumentCategory::create([
|
|||
|
|
"name" => "Documents",
|
|||
|
|
"slug" => "documents"
|
|||
|
|
]);
|
|||
|
|
$meetings = DocumentCategory::create([
|
|||
|
|
"name" => "Assemblées générales",
|
|||
|
|
"slug" => "assemblees-generales"
|
|||
|
|
]);
|
|||
|
|
$investors = DocumentCategory::create([
|
|||
|
|
"name" => "Présentation investisseurs",
|
|||
|
|
"slug" => "presentation-investisseurs"
|
|||
|
|
]);
|
|||
|
|
$press = DocumentCategory::create([
|
|||
|
|
"name" => "Espace presse",
|
|||
|
|
"slug" => "espace-presse"
|
|||
|
|
]);
|
|||
|
|
|
|||
|
|
// Set EN values.
|
|||
|
|
app()->setLocale("en");
|
|||
|
|
$docs->update([
|
|||
|
|
"name" => "Documents",
|
|||
|
|
"slug" => "documents"
|
|||
|
|
]);
|
|||
|
|
$meetings->update([
|
|||
|
|
"name" => "General meetings",
|
|||
|
|
"slug" => "general-meetings"
|
|||
|
|
]);
|
|||
|
|
$investors->update([
|
|||
|
|
"name" => "Investor presentation",
|
|||
|
|
"slug" => "investor-presentation"
|
|||
|
|
]);
|
|||
|
|
$press->update([
|
|||
|
|
"name" => "Meetings Press area",
|
|||
|
|
"slug" => "meeting-press-area"
|
|||
|
|
]);
|
|||
|
|
|
|||
|
|
// Set locale to the fallback.
|
|||
|
|
app()->setLocale(config('app.fallback_locale'));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Set custom document tag seeder.
|
|||
|
|
*
|
|||
|
|
* @return void
|
|||
|
|
*/
|
|||
|
|
private function documentTagSeeder(): void
|
|||
|
|
{
|
|||
|
|
// Set FR values.
|
|||
|
|
app()->setLocale("fr");
|
|||
|
|
$communique = DocumentTag::create([
|
|||
|
|
"name" => "Communiqués et Avis financiers",
|
|||
|
|
"slug" => "communiques-et-avis-financiers"
|
|||
|
|
]);
|
|||
|
|
$semestriel = DocumentTag::create([
|
|||
|
|
"name" => "Rapports financiers annuels et semestriels",
|
|||
|
|
"slug" => "rapports-financiers-annuels-et-semestriels"
|
|||
|
|
]);
|
|||
|
|
$droitdevote = DocumentTag::create([
|
|||
|
|
"name" => "Déclaration mensuelles du nombre d’actions et de droits de vote",
|
|||
|
|
"slug" => "declaration-mensuelles-du-nombre-dactions-et-de-droits-de-vote"
|
|||
|
|
]);
|
|||
|
|
$rachat = DocumentTag::create([
|
|||
|
|
"name" => "Descriptif de programme de rachats d’actions",
|
|||
|
|
"slug" => "descriptif-de-programme-de-rachats-dactions"
|
|||
|
|
]);
|
|||
|
|
$liquidite = DocumentTag::create([
|
|||
|
|
"name" => "Opérations sur contrat de liquidité",
|
|||
|
|
"slug" => "operations-sur-contrat-de-liquidite"
|
|||
|
|
]);
|
|||
|
|
$trimestriel = DocumentTag::create([
|
|||
|
|
"name" => "Information Trimestrielle",
|
|||
|
|
"slug" => "information-trimestrielle"
|
|||
|
|
]);
|
|||
|
|
$publication = DocumentTag::create([
|
|||
|
|
"name" => "Publication",
|
|||
|
|
"slug" => "publication"
|
|||
|
|
]);
|
|||
|
|
$finance = DocumentTag::create([
|
|||
|
|
"name" => "Finance",
|
|||
|
|
"slug" => "finance"
|
|||
|
|
]);
|
|||
|
|
$general = DocumentTag::create([
|
|||
|
|
"name" => "Assemblée générale des actionnaires",
|
|||
|
|
"slug" => "assemblee-generale-des-actionnaires"
|
|||
|
|
]);
|
|||
|
|
$declaration = DocumentTag::create([
|
|||
|
|
"name" => "Déclaration des rachats d’actions",
|
|||
|
|
"slug" => "declaration-des-rachats-dactions"
|
|||
|
|
]);
|
|||
|
|
$statuts = DocumentTag::create([
|
|||
|
|
"name" => "Statuts de la SA LDC",
|
|||
|
|
"slug" => "statuts-de-la-sa-ldc"
|
|||
|
|
]);
|
|||
|
|
|
|||
|
|
// Set EN values.
|
|||
|
|
app()->setLocale("en");
|
|||
|
|
$communique->update([
|
|||
|
|
"name" => "Press releases and financial notices",
|
|||
|
|
"slug" => "communiques-et-avis-financiers-en"
|
|||
|
|
]);
|
|||
|
|
$semestriel->update([
|
|||
|
|
"name" => "Annual and half-yearly financial reports",
|
|||
|
|
"slug" => "rapports-financiers-annuels-et-semestriels-en"
|
|||
|
|
]);
|
|||
|
|
$droitdevote->update([
|
|||
|
|
"name" => "Monthly declaration of the number of shares and voting rights",
|
|||
|
|
"slug" => "declaration-mensuelles-du-nombre-dactions-et-de-droits-de-vote-en"
|
|||
|
|
]);
|
|||
|
|
$rachat->update([
|
|||
|
|
"name" => "Description of share buyback program",
|
|||
|
|
"slug" => "descriptif-de-programme-de-rachats-dactions-en"
|
|||
|
|
]);
|
|||
|
|
$liquidite->update([
|
|||
|
|
"name" => "Liquidity contract transactions",
|
|||
|
|
"slug" => "operations-sur-contrat-de-liquidite-en"
|
|||
|
|
]);
|
|||
|
|
$trimestriel->update([
|
|||
|
|
"name" => "Quarterly Information",
|
|||
|
|
"slug" => "information-trimestrielle-en"
|
|||
|
|
]);
|
|||
|
|
$publication->update([
|
|||
|
|
"name" => "Publication",
|
|||
|
|
"slug" => "publication-en"
|
|||
|
|
]);
|
|||
|
|
$finance->update([
|
|||
|
|
"name" => "Finance",
|
|||
|
|
"slug" => "finance-en"
|
|||
|
|
]);
|
|||
|
|
$general->update([
|
|||
|
|
"name" => "General Meeting of Shareholders",
|
|||
|
|
"slug" => "assemblee-generale-des-actionnaires-en"
|
|||
|
|
]);
|
|||
|
|
$declaration->update([
|
|||
|
|
"name" => "Declaration of share buybacks",
|
|||
|
|
"slug" => "declaration-des-rachats-dactions-en"
|
|||
|
|
]);
|
|||
|
|
$statuts->update([
|
|||
|
|
"name" => "Statutes of SA LDC",
|
|||
|
|
"slug" => "statuts-de-la-sa-ldc-en"
|
|||
|
|
]);
|
|||
|
|
|
|||
|
|
// Set locale to the fallback.
|
|||
|
|
app()->setLocale(config('app.fallback_locale'));
|
|||
|
|
}
|
|||
|
|
}
|