<?php

namespace Database\Factories;

use App\Models\Seller;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

class SellerFactory extends Factory
{
    protected $model = Seller::class;

    public function definition(): array
    {
        return [
            'user_id' => User::factory(),
            'company_name' => $companyName = $this->faker->company,
            'slug' => \Illuminate\Support\Str::slug($companyName),
            'gst' => $this->faker->regexify('[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}'),
            'iec' => $this->faker->regexify('[0-9]{10}'),
            'state' => $this->faker->state,
            'country' => 'India',
            'is_verified' => $this->faker->boolean(30), // 30% chance of being verified
        ];
    }
}
