-- === Companies ===
INSERT INTO company_entity (id, name, country)
VALUES
    (1, 'Global Logistics', 'France'),
    (2, 'TransWorld Exports', 'Germany');

-- === Users ===
INSERT INTO user_entity (id, username, first_name, last_name, email, password, role, enabled, company_id)
VALUES
    (1, 'admin1', 'Alice', 'Martin', 'alice@globallogistics.com', '$2a$10$hash1', 'ADMIN', true, 1),
    (2, 'user1', 'Bob', 'Dupont', 'bob@globallogistics.com', '$2a$10$hash2', 'USER', true, 1),
    (3, 'admin2', 'Eva', 'Schmidt', 'eva@transworld.com', '$2a$10$hash3', 'ADMIN', true, 2);

-- === Licenses ===
INSERT INTO license_entity (id, license_key, expiration_date, active, user_id)
VALUES
    (1, 'LIC-GL-A', '2025-12-31', true, 1),
    (2, 'LIC-GL-B', '2025-12-31', true, 2),
    (3, 'LIC-TW-A', '2025-11-30', true, 3);

-- === Quotes ===
INSERT INTO quote_entity (id, reference, status, estimated_amount, created_at, user_id, company_id)
VALUES
    ('550e8400-e29b-41d4-a716-446655440000', 'QT-GL-001', 'PENDING', 1200.50, CURRENT_TIMESTAMP, 1, 1),
    ('550e8400-e29b-41d4-a716-446655440001', 'QT-GL-002', 'VALIDATED', 2300.75, CURRENT_TIMESTAMP, 2, 1),
    ('550e8400-e29b-41d4-a716-446655440002', 'QT-TW-001', 'VALIDATED', 1950.00, CURRENT_TIMESTAMP, 3, 2);

-- === Export Folders ===
INSERT INTO export_folder_entity (id, reference, validation_date, company_id, quote_id)
VALUES
    (1, 'EXP-GL-002', CURRENT_TIMESTAMP, 1, '550e8400-e29b-41d4-a716-446655440001'),
    (2, 'EXP-TW-001', CURRENT_TIMESTAMP, 2, '550e8400-e29b-41d4-a716-446655440002');

-- === Tokens ===
INSERT INTO token (id, token, token_type, revoked, expired, user_id)
VALUES
    (1, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9-admin1', 'BEARER', false, false, 1),
    (2, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9-user1', 'BEARER', false, false, 2),
    (3, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9-admin2', 'BEARER', false, false, 3);
