<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class PostCommentTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        for ($i = 1; $i <= 25; $i++) {
            DB::table('post_comments')->insertGetId([
                'post_id' => rand(1, 15),
                'user_id' => rand(1, 11),
                'parent_id' => null,
                'content' => 'This is a comment on post ' . rand(1, 15) . '. Great post!',
                'status' => ['pending', 'approved', 'rejected'][rand(0, 2)],
                'created_at' => now(),
                'updated_at' => now(),
            ]);
        }
    }
}
