<?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class ChatSeeder extends Seeder
{
    public function run()
    {
        // Chat channels
        DB::table('chat_channels')->insert([
            ['tag' => 'general', 'public' => 1, 'created_at' => now(), 'updated_at' => now()],
        ]);
        // Chat messages
        DB::table('chat_messages')->insert([
            ['thread_id' => 'general', 'from_id' => 1, 'message' => 'Welcome to chat!', 'created_at' => now(), 'updated_at' => now()],
        ]);
        // Calls
        DB::table('calls')->insert([
            ['uniqueid' => '1001', 'user_id' => 1, 'number' => '0123456789', 'call_type' => 'IN', 'state' => 'completed', 'created_at' => now(), 'updated_at' => now()],
        ]);
        $this->command->info('Seeded Chat/Comms tables');
    }
} 