<?php
declare(strict_types=1);
namespace Repositories;

final class LeadRepository extends BaseRepository
{
    public function createBulkOrder(array $data): int
    {
        $this->execute('INSERT INTO bulk_orders(name, business_name, phone, email, city, product_interest, quantity_required, message) VALUES(:name,:business_name,:phone,:email,:city,:product_interest,:quantity_required,:message)', $data);
        return (int)$this->db->lastInsertId();
    }
    public function createDistributorInquiry(array $data): int
    {
        $this->execute('INSERT INTO distributor_inquiries(name, business_name, phone, email, city, state, business_type, message) VALUES(:name,:business_name,:phone,:email,:city,:state,:business_type,:message)', $data);
        return (int)$this->db->lastInsertId();
    }
    public function createContact(array $data): int
    {
        $this->execute('INSERT INTO contact_messages(name, email, phone, subject, message) VALUES(:name,:email,:phone,:subject,:message)', $data);
        return (int)$this->db->lastInsertId();
    }
}
