diff --git a/database/factories/AnnouncementFactory.php b/database/factories/AnnouncementFactory.php deleted file mode 100644 index e2cd522..0000000 --- a/database/factories/AnnouncementFactory.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class AnnouncementFactory extends Factory -{ - protected $model = Announcement::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'content' => $this->faker->paragraphs(2, true), - ]; - } - - /** - * Indicate that the announcement is important. - */ - public function important(): static - { - return $this->state(fn (array $attributes) => [ - 'content' => 'PENTING: '.$this->faker->sentence(10), - ]); - } - - /** - * Indicate that the announcement is informational. - */ - public function informational(): static - { - return $this->state(fn (array $attributes) => [ - 'content' => 'INFORMASI: '.$this->faker->paragraph(), - ]); - } -} diff --git a/database/factories/AnnouncementMediaFactory.php b/database/factories/AnnouncementMediaFactory.php deleted file mode 100644 index 71fe3a5..0000000 --- a/database/factories/AnnouncementMediaFactory.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class AnnouncementMediaFactory extends Factory -{ - protected $model = AnnouncementMedia::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'announcement_id' => Announcement::factory(), - 'partner_media_id' => PartnerMedia::factory(), - ]; - } - - /** - * Indicate that the announcement user is for a specific announcement. - */ - public function forAnnouncement(Announcement $announcement): static - { - return $this->state(fn (array $attributes) => [ - 'announcement_id' => $announcement->id, - ]); - } - - /** - * Indicate that the announcement user is for a specific partner media. - */ - public function forPartnerMedia(PartnerMedia $partnerMedia): static - { - return $this->state(fn (array $attributes) => [ - 'partner_media_id' => $partnerMedia->id, - ]); - } -} diff --git a/database/factories/ClassificationFactory.php b/database/factories/ClassificationFactory.php deleted file mode 100644 index 032e8c1..0000000 --- a/database/factories/ClassificationFactory.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -class ClassificationFactory extends Factory -{ - protected $model = Classification::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'name' => $this->faker->words(2, true), - 'description' => $this->faker->sentence(), - 'is_active' => $this->faker->randomElement([IsActive::ACTIVE->value, IsActive::INACTIVE->value]), - 'sort_order' => $this->faker->numberBetween(0, 100), - ]; - } - - /** - * Indicate that the classification is active. - */ - public function active(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::ACTIVE->value, - ]); - } - - /** - * Indicate that the classification is inactive. - */ - public function inactive(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::INACTIVE->value, - ]); - } -} diff --git a/database/factories/CompanyFactory.php b/database/factories/CompanyFactory.php deleted file mode 100644 index ba5bd17..0000000 --- a/database/factories/CompanyFactory.php +++ /dev/null @@ -1,71 +0,0 @@ - - */ -class CompanyFactory extends Factory -{ - protected $model = Company::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'user_id' => User::factory(), - 'name' => $this->faker->company(), - 'email' => $this->faker->unique()->companyEmail(), - 'address' => $this->faker->address(), - 'director_name' => $this->faker->name(), - 'director_nik' => $this->faker->numerify('################'), - 'deed_incorporation' => $this->faker->numerify('AHU-#######.AH.##.##'), - 'trade_license' => $this->faker->numerify('###/###/SIUP/####'), - 'tax_id_number' => $this->faker->numerify('##.###.###.#-###.###'), - 'taxable_enterprise' => $this->faker->numerify('###.###.###.###'), - 'annual_tax_return' => $this->faker->numerify('SPT-####-########'), - 'domicile_certificate' => $this->faker->numerify('###/###/DOMISILI/####'), - 'profile' => $this->faker->numerify('PROFILE-####-########'), - 'profile' => $this->faker->numerify('PROFILE-####-########'), - ]; - } - - /** - * Indicate that the company is validated. - */ - public function validated(): static - { - return $this->state(fn (array $attributes) => [ - 'status' => VerificationStatus::APPROVED, - ]); - } - - /** - * Indicate that the company is rejected. - */ - public function rejected(): static - { - return $this->state(fn (array $attributes) => [ - 'status' => VerificationStatus::REJECTED, - ]); - } - - /** - * Indicate that the company is pending validation. - */ - public function pending(): static - { - return $this->state(fn (array $attributes) => [ - 'status' => VerificationStatus::PENDING, - ]); - } -} diff --git a/database/factories/ContentRecapFactory.php b/database/factories/ContentRecapFactory.php deleted file mode 100644 index ace9c04..0000000 --- a/database/factories/ContentRecapFactory.php +++ /dev/null @@ -1,110 +0,0 @@ - - */ -class ContentRecapFactory extends Factory -{ - protected $model = ContentRecap::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - $channels = [ - 'Website', - 'Facebook', - 'Instagram', - 'Twitter', - 'YouTube', - 'TikTok', - 'WhatsApp', - 'Telegram', - 'LinkedIn', - ]; - - return [ - 'classification_id' => Classification::factory(), - 'title' => $this->faker->sentence(4), - 'link' => $this->faker->optional(0.8)->url(), - 'posting_date' => $this->faker->dateTimeBetween('-6 months', 'now')->format('Y-m-d'), - 'type' => $this->faker->randomElement(ContentType::cases())->value, - 'channel' => $this->faker->randomElement($channels), - 'social_media' => $this->faker->randomElement(SocialMedia::cases())->value, - ]; - } - - /** - * Indicate that the content recap is photo type. - */ - public function photo(): static - { - return $this->state(fn (array $attributes) => [ - 'type' => ContentType::FOTO->value, - ]); - } - - /** - * Indicate that the content recap is video type. - */ - public function video(): static - { - return $this->state(fn (array $attributes) => [ - 'type' => ContentType::VIDEO->value, - 'channel' => $this->faker->randomElement(['YouTube', 'Instagram', 'TikTok']), - ]); - } - - /** - * Indicate that the content recap is text type. - */ - public function text(): static - { - return $this->state(fn (array $attributes) => [ - 'type' => ContentType::TEXT->value, - ]); - } - - /** - * Indicate that the content recap is graphic type. - */ - public function graphic(): static - { - return $this->state(fn (array $attributes) => [ - 'type' => ContentType::GRAPHIC->value, - ]); - } - - /** - * Indicate that the content recap is for Instagram. - */ - public function instagram(): static - { - return $this->state(fn (array $attributes) => [ - 'channel' => 'Instagram', - 'social_media' => 'Instagram', - ]); - } - - /** - * Indicate that the content recap is for Facebook. - */ - public function facebook(): static - { - return $this->state(fn (array $attributes) => [ - 'channel' => 'Facebook', - 'social_media' => 'Facebook', - ]); - } -} diff --git a/database/factories/DepartmentFactory.php b/database/factories/DepartmentFactory.php deleted file mode 100644 index 648ca7f..0000000 --- a/database/factories/DepartmentFactory.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ -class DepartmentFactory extends Factory -{ - protected $model = Department::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - $name = $this->faker->randomElement([ - 'Dinas Komunikasi dan Informatika', - 'Dinas Pendidikan', - 'Dinas Kesehatan', - 'Dinas Pekerjaan Umum', - 'Dinas Sosial', - 'Dinas Pariwisata', - 'Dinas Perhubungan', - 'Dinas Lingkungan Hidup', - ]); - - return [ - 'name' => $name, - 'alias' => strtoupper(substr(str_replace(['Dinas ', ' dan ', ' '], ['', '', ''], $name), 0, 10)), - 'is_active' => $this->faker->randomElement([IsActive::ACTIVE->value, IsActive::INACTIVE->value]), - 'sort_order' => $this->faker->numberBetween(0, 100), - ]; - } - - /** - * Indicate that the department is active. - */ - public function active(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::ACTIVE->value, - ]); - } - - /** - * Indicate that the department is inactive. - */ - public function inactive(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::INACTIVE->value, - ]); - } -} diff --git a/database/factories/IssueManagementFactory.php b/database/factories/IssueManagementFactory.php deleted file mode 100644 index 61dba45..0000000 --- a/database/factories/IssueManagementFactory.php +++ /dev/null @@ -1,109 +0,0 @@ - - */ -class IssueManagementFactory extends Factory -{ - protected $model = IssueManagement::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'location_id' => Location::factory(), - 'sub_location_id' => SubLocation::factory(), - 'classification_id' => Classification::factory(), - 'sub_classification_id' => SubClassification::factory(), - 'media_monitoring_id' => MediaMonitoring::factory(), - 'issue' => $this->faker->randomElement(IssueSentiment::cases())->value, - 'response' => $this->faker->randomElement(IssueSentiment::cases())->value, - 'description' => $this->faker->paragraphs(2, true), - ]; - } - - /** - * Indicate that the issue is positive. - */ - public function positive(): static - { - return $this->state(fn (array $attributes) => [ - 'issue' => IssueSentiment::POSITIVE->value, - 'response' => IssueSentiment::POSITIVE->value, - ]); - } - - /** - * Indicate that the issue is negative. - */ - public function negative(): static - { - return $this->state(fn (array $attributes) => [ - 'issue' => IssueSentiment::NEGATIVE->value, - 'response' => $this->faker->randomElement([ - IssueSentiment::POSITIVE->value, - IssueSentiment::NEUTRAL->value, - ]), - ]); - } - - /** - * Indicate that the issue is neutral. - */ - public function neutral(): static - { - return $this->state(fn (array $attributes) => [ - 'issue' => IssueSentiment::NEUTRAL->value, - 'response' => IssueSentiment::NEUTRAL->value, - ]); - } - - /** - * Indicate that the issue is crisis. - */ - public function crisis(): static - { - return $this->state(fn (array $attributes) => [ - 'issue' => IssueSentiment::CRISIS->value, - 'response' => $this->faker->randomElement([ - IssueSentiment::POSITIVE->value, - IssueSentiment::NEUTRAL->value, - ]), - ]); - } - - /** - * Indicate that the issue has no sub location. - */ - public function withoutSubLocation(): static - { - return $this->state(fn (array $attributes) => [ - 'sub_location_id' => null, - ]); - } - - /** - * Indicate that the issue has no sub classification. - */ - public function withoutSubClassification(): static - { - return $this->state(fn (array $attributes) => [ - 'sub_classification_id' => null, - ]); - } -} diff --git a/database/factories/JournalistFactory.php b/database/factories/JournalistFactory.php deleted file mode 100644 index 33c8338..0000000 --- a/database/factories/JournalistFactory.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -class JournalistFactory extends Factory -{ - protected $model = Journalist::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'partner_media_id' => PartnerMedia::factory(), - 'name' => $this->faker->name(), - 'email' => $this->faker->unique()->safeEmail(), - 'phone_number' => $this->faker->phoneNumber(), - 'press_card' => $this->faker->optional(0.8)->numerify('PWI-####-########'), - 'ukw_certificate' => $this->faker->optional(0.6)->numerify('UKW-####-########'), - ]; - } - - /** - * Indicate that the journalist has press credentials. - */ - public function withCredentials(): static - { - return $this->state(fn (array $attributes) => [ - 'press_card' => $this->faker->numerify('PWI-####-########'), - 'ukw_certificate' => $this->faker->numerify('UKW-####-########'), - ]); - } - - /** - * Indicate that the journalist has no credentials. - */ - public function withoutCredentials(): static - { - return $this->state(fn (array $attributes) => [ - 'press_card' => null, - 'ukw_certificate' => null, - ]); - } -} diff --git a/database/factories/LocationFactory.php b/database/factories/LocationFactory.php deleted file mode 100644 index a8e5da5..0000000 --- a/database/factories/LocationFactory.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -class LocationFactory extends Factory -{ - protected $model = Location::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'name' => $this->faker->city(), - 'description' => $this->faker->sentence(), - 'is_active' => $this->faker->randomElement([IsActive::ACTIVE->value, IsActive::INACTIVE->value]), - 'sort_order' => $this->faker->numberBetween(0, 100), - ]; - } - - /** - * Indicate that the location is active. - */ - public function active(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::ACTIVE->value, - ]); - } - - /** - * Indicate that the location is inactive. - */ - public function inactive(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::INACTIVE->value, - ]); - } -} diff --git a/database/factories/MediaMonitoringFactory.php b/database/factories/MediaMonitoringFactory.php deleted file mode 100644 index af55701..0000000 --- a/database/factories/MediaMonitoringFactory.php +++ /dev/null @@ -1,106 +0,0 @@ - - */ -class MediaMonitoringFactory extends Factory -{ - protected $model = MediaMonitoring::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - $mediaNames = [ - 'Kompas.com', - 'Detik.com', - 'Tribun News', - 'Liputan6', - 'CNN Indonesia', - 'ANTARA News', - 'Tempo.co', - 'Okezone', - 'Suara.com', - 'Bisnis.com', - ]; - - $channels = [ - 'Website', - 'Facebook', - 'Instagram', - 'Twitter', - 'YouTube', - 'TikTok', - 'WhatsApp', - 'Telegram', - 'LinkedIn', - ]; - - return [ - 'code' => $this->faker->unique()->regexify('[A-Z]{2}[0-9]{8}'), - 'media_name' => $this->faker->randomElement($mediaNames), - 'title' => $this->faker->sentence(6), - 'channel' => $this->faker->randomElement($channels), - 'writter' => $this->faker->name(), - 'link' => $this->faker->optional(0.8)->url(), - 'news_page' => $this->faker->optional(0.3)->numberBetween(1, 20), - 'quote' => $this->faker->optional(0.4)->paragraph(), - 'content' => $this->faker->paragraphs(3, true), - 'influencer' => $this->faker->optional(0.2)->name(), - 'keyword' => implode(', ', $this->faker->words(3)), - 'release_date' => $this->faker->dateTimeBetween('-1 year', 'now')->format('Y-m-d'), - ]; - } - - /** - * Indicate that the media monitoring is for online media. - */ - public function online(): static - { - return $this->state(fn (array $attributes) => [ - 'channel' => $this->faker->randomElement(['Website', 'Facebook', 'Instagram', 'Twitter']), - 'link' => $this->faker->url(), - 'news_page' => null, - ]); - } - - /** - * Indicate that the media monitoring is for print media. - */ - public function print(): static - { - return $this->state(fn (array $attributes) => [ - 'channel' => 'Print', - 'link' => null, - 'news_page' => $this->faker->numberBetween(1, 20), - ]); - } - - /** - * Indicate that the media monitoring has influencer mention. - */ - public function withInfluencer(): static - { - return $this->state(fn (array $attributes) => [ - 'influencer' => $this->faker->name(), - ]); - } - - /** - * Indicate that the media monitoring has quote. - */ - public function withQuote(): static - { - return $this->state(fn (array $attributes) => [ - 'quote' => $this->faker->paragraph(), - ]); - } -} diff --git a/database/factories/MediaMonitoringThemeFactory.php b/database/factories/MediaMonitoringThemeFactory.php deleted file mode 100644 index 100c9ee..0000000 --- a/database/factories/MediaMonitoringThemeFactory.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -class MediaMonitoringThemeFactory extends Factory -{ - protected $model = MediaMonitoringTheme::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'media_monitoring_id' => MediaMonitoring::factory(), - 'theme_id' => Theme::factory(), - ]; - } -} diff --git a/database/factories/NewsFactory.php b/database/factories/NewsFactory.php deleted file mode 100644 index c57efce..0000000 --- a/database/factories/NewsFactory.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ -class NewsFactory extends Factory -{ - protected $model = News::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - $title = $this->faker->sentence(6); - - return [ - 'author_id' => User::factory(), - 'title' => $title, - 'slug' => Str::slug($title), - 'content' => $this->faker->paragraphs(3, true), - 'link' => $this->faker->optional(0.3)->url(), - 'view' => $this->faker->numberBetween(0, 10000), - ]; - } - - /** - * Indicate that the news has high views. - */ - public function popular(): static - { - return $this->state(fn (array $attributes) => [ - 'view' => $this->faker->numberBetween(5000, 50000), - ]); - } - - /** - * Indicate that the news has external link. - */ - public function withLink(): static - { - return $this->state(fn (array $attributes) => [ - 'link' => $this->faker->url(), - ]); - } - - /** - * Indicate that the news has no views. - */ - public function unpublished(): static - { - return $this->state(fn (array $attributes) => [ - 'view' => 0, - ]); - } -} diff --git a/database/factories/NewsTagsFactory.php b/database/factories/NewsTagsFactory.php deleted file mode 100644 index 509db56..0000000 --- a/database/factories/NewsTagsFactory.php +++ /dev/null @@ -1,81 +0,0 @@ - - */ -class NewsTagsFactory extends Factory -{ - protected $model = NewsTags::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - $tags = [ - 'Berita', - 'Update', - 'Pengumuman', - 'Event', - 'Kegiatan', - 'Kominfo', - 'Diskominfo', - 'Pemerintah', - 'Publik', - 'Informasi', - 'Layanan', - 'Digital', - 'Teknologi', - 'Sosial', - 'Ekonomi', - 'Pendidikan', - 'Kesehatan', - 'Lingkungan', - 'Infrastruktur', - 'Transportasi', - ]; - - return [ - 'news_id' => News::factory(), - 'name' => $this->faker->randomElement($tags), - ]; - } - - /** - * Indicate that the tag is for news category. - */ - public function news(): static - { - return $this->state(fn (array $attributes) => [ - 'name' => 'Berita', - ]); - } - - /** - * Indicate that the tag is for announcement category. - */ - public function announcement(): static - { - return $this->state(fn (array $attributes) => [ - 'name' => 'Pengumuman', - ]); - } - - /** - * Indicate that the tag is for event category. - */ - public function event(): static - { - return $this->state(fn (array $attributes) => [ - 'name' => 'Event', - ]); - } -} diff --git a/database/factories/PartnerMediaFactory.php b/database/factories/PartnerMediaFactory.php deleted file mode 100644 index 4b26fa5..0000000 --- a/database/factories/PartnerMediaFactory.php +++ /dev/null @@ -1,120 +0,0 @@ - - */ -class PartnerMediaFactory extends Factory -{ - protected $model = PartnerMedia::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - $mediaNames = [ - 'Kompas.com', - 'Detik.com', - 'Tribun News', - 'Liputan6', - 'CNN Indonesia', - 'ANTARA News', - 'Tempo.co', - 'Okezone', - 'Suara.com', - 'Bisnis.com', - 'Media Indonesia', - 'Republika', - 'Koran Sindo', - 'Pikiran Rakyat', - ]; - - return [ - 'company_id' => Company::factory(), - 'name' => $this->faker->randomElement($mediaNames), - 'address' => $this->faker->address(), - 'link' => $this->faker->optional(0.8)->domainName(), - 'type' => $this->faker->randomElement(MediaType::cases())->value, - 'classification' => $this->faker->randomElement(MediaClassification::cases())->value, - 'journalism_organization' => $this->faker->optional(0.6)->randomElement([ - 'Persatuan Wartawan Indonesia (PWI)', - 'Aliansi Jurnalis Independen (AJI)', - 'Ikatan Jurnalis Televisi Indonesia (IJTI)', - 'Persatuan Jurnalis Online Indonesia (PJOI)', - ]), - 'press_council_certificate' => $this->faker->optional(0.7)->numerify('DEP-###/####/KP'), - ]; - } - - /** - * Indicate that the partner media is online type. - */ - public function online(): static - { - return $this->state(fn (array $attributes) => [ - 'type' => MediaType::ONLINE->value, - 'link' => $this->faker->domainName(), - ]); - } - - /** - * Indicate that the partner media is print type. - */ - public function print(): static - { - return $this->state(fn (array $attributes) => [ - 'type' => MediaType::PRINT->value, - 'link' => null, - ]); - } - - /** - * Indicate that the partner media is television type. - */ - public function television(): static - { - return $this->state(fn (array $attributes) => [ - 'type' => MediaType::TELEVISION->value, - ]); - } - - /** - * Indicate that the partner media is radio type. - */ - public function radio(): static - { - return $this->state(fn (array $attributes) => [ - 'type' => MediaType::RADIO->value, - ]); - } - - /** - * Indicate that the partner media is national classification. - */ - public function national(): static - { - return $this->state(fn (array $attributes) => [ - 'classification' => MediaClassification::NATIONAL->value, - ]); - } - - /** - * Indicate that the partner media is local classification. - */ - public function local(): static - { - return $this->state(fn (array $attributes) => [ - 'classification' => MediaClassification::LOCAL->value, - ]); - } -} diff --git a/database/factories/SubClassificationFactory.php b/database/factories/SubClassificationFactory.php deleted file mode 100644 index 8d7a8a3..0000000 --- a/database/factories/SubClassificationFactory.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class SubClassificationFactory extends Factory -{ - protected $model = SubClassification::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'classification_id' => Classification::factory(), - 'name' => $this->faker->words(2, true), - 'description' => $this->faker->sentence(), - 'is_active' => $this->faker->randomElement([IsActive::ACTIVE->value, IsActive::INACTIVE->value]), - 'sort_order' => $this->faker->numberBetween(0, 100), - ]; - } - - /** - * Indicate that the sub classification is active. - */ - public function active(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::ACTIVE->value, - ]); - } - - /** - * Indicate that the sub classification is inactive. - */ - public function inactive(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::INACTIVE->value, - ]); - } -} diff --git a/database/factories/SubLocationFactory.php b/database/factories/SubLocationFactory.php deleted file mode 100644 index b888f33..0000000 --- a/database/factories/SubLocationFactory.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class SubLocationFactory extends Factory -{ - protected $model = SubLocation::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'location_id' => Location::factory(), - 'name' => $this->faker->streetName(), - 'description' => $this->faker->sentence(), - 'is_active' => $this->faker->randomElement([IsActive::ACTIVE->value, IsActive::INACTIVE->value]), - 'sort_order' => $this->faker->numberBetween(0, 100), - ]; - } - - /** - * Indicate that the sub location is active. - */ - public function active(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::ACTIVE->value, - ]); - } - - /** - * Indicate that the sub location is inactive. - */ - public function inactive(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::INACTIVE->value, - ]); - } -} diff --git a/database/factories/ThemeFactory.php b/database/factories/ThemeFactory.php deleted file mode 100644 index 5b008d6..0000000 --- a/database/factories/ThemeFactory.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class ThemeFactory extends Factory -{ - protected $model = Theme::class; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'name' => $this->faker->words(2, true), - 'is_active' => $this->faker->randomElement([IsActive::ACTIVE->value, IsActive::INACTIVE->value]), - 'sort_order' => $this->faker->numberBetween(0, 100), - ]; - } - - /** - * Indicate that the theme is active. - */ - public function active(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::ACTIVE->value, - ]); - } - - /** - * Indicate that the theme is inactive. - */ - public function inactive(): static - { - return $this->state(fn (array $attributes) => [ - 'is_active' => IsActive::INACTIVE->value, - ]); - } -} diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php deleted file mode 100644 index fa69d4f..0000000 --- a/database/factories/UserFactory.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class UserFactory extends Factory -{ - /** - * The current password being used by the factory. - */ - protected static ?string $password; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'name' => fake()->name(), - 'email' => fake()->unique()->safeEmail(), - 'username' => $this->faker->unique()->bothify('?????#####'), - 'email_verified_at' => now(), - 'password' => static::$password ??= Hash::make(config('auth.password_default')), - 'remember_token' => Str::random(10), - ]; - } - - /** - * Indicate that the model's email address should be unverified. - */ - public function unverified(): static - { - return $this->state(fn (array $attributes) => [ - 'email_verified_at' => null, - ]); - } -}