You are a senior Laravel engineer. Your task is to generate Laravel Factories and Seeders based on the configuration file `crudgenerator.php`.

INPUT

- You will be given the full content of `crudgenerator.php` which returns an array with key: `data` (list of CRUD modules).
- Each module usually has keys like:
  - model (string) e.g. "Department"
  - table_name (string)
  - migration (string)
  - columns (array) where keys are column names
  - validations (array) Laravel validation rules (string)
  - defaults (array) default values; may reference Enums like "\App\Enums\OriginStatusType::Active"
  - options_source (optional) mapping option list name -> model class, used for foreign key select (e.g. users => App\Models\User)
  - is_generate (optional boolean). If exists and false, SKIP generating factory/seeder for that module. If missing, treat as true.
  - is_react_page is irrelevant for this task.

GOAL
Generate:

1. Factory class for each generated model:
   - Path: database/factories/{Model}Factory.php
   - Use Illuminate\Database\Eloquent\Factories\Factory
   - Provide realistic faker data for columns from `columns` and `validations`
   - Respect required/nullable fields:
     - If validation contains "required" => always fill
     - If validation contains "nullable" => sometimes null (e.g. 30–50% chance)
   - Respect uniqueness:
     - If validation contains "unique:{table},{col}" => use $this->faker->unique()->...
   - Respect types inferred from validation:
     - integer => numberBetween
     - boolean => boolean()
     - email => safeEmail()
     - string => words/name/sentence depending on semantic column name
     - date/datetime => dateTimeBetween
   - Apply defaults from `defaults`:
     - If field exists in defaults, set it to that constant/value unless the factory intentionally randomizes among enum values.
     - For enum constants (e.g. \App\Enums\OriginStatusType::Active), use the constant directly.
2. Seeder(s):
   - Prefer one seeder per model:
     - Path: database/seeders/Initial/{Model}Seeder.php
     - Namespace: Database\Seeders\Initial
   - Each seeder should create a sensible amount of data using the corresponding factory.
   - Handle relations/foreign keys:
     - Detect foreign keys by:
       a) validations containing "exists:xxx,id"
       b) column name ends with "\_id"
       c) options_source provides the model source for select options
     - Ensure parent tables are seeded FIRST.
     - In each factory, foreign keys should be created via related factory if the related model exists:
       - e.g. 'user_id' => \App\Models\User::factory()
     - For pivot-like tables (e.g. user_departments, user_banks, etc.), create pairs of related models and link them.
   - Update DatabaseSeeder.php to call all created seeders in correct order, using the full namespace (e.g. \Database\Seeders\Initial\UserSeeder::class).
   - Add idempotent-ish behavior where possible (avoid duplicates if rerun) ONLY if you can do it cleanly; otherwise keep standard seeding.

RULES / CONSTRAINTS

- Laravel version: assume modern Laravel (9/10/11 style).
- Use model namespaces: \App\Models\{Model}. (Do not guess other namespaces.)
- Do not modify migrations.
- Do not invent columns not present in the config. Only fill attributes that exist in:
  - validations keys OR columns keys OR defaults keys.
- If a model has password field:
  - Use Hash::make('password') or bcrypt('password'), and import Hash facade.
- If a model has status/type/role/period_type fields with enum defaults:
  - Use defaults constant by default, but you may randomize among enum cases ONLY if the enum class can be safely referenced (otherwise keep default).
- If a required relation cannot be resolved because the target model is NOT in the config:
  - Still set foreign key using a fallback query:
    - use existing record id if exists, else create a minimal related record IF the model class exists.
  - Keep it robust and avoid crashing.

OUTPUT FORMAT

- Output code changes as file-by-file patches (diff style) or full file contents with clear file paths.
- Include:
  - All created/updated factory files
  - All created/updated seeder files
  - Updated database/seeders/DatabaseSeeder.php

CHECKLIST BEFORE FINAL

- Every generated model has a matching Factory.
- Every generated model has a matching Seeder.
- DatabaseSeeder calls them in dependency order (parents before children).
- Factories won’t violate required/unique/exists rules.
- For pivot tables, ensure foreign keys are valid and combinations are reasonable.

Now read `crudgenerator.php` content and implement the factories + seeders accordingly.
Return ONLY the code changes (no explanations).
