-- =============================================================================
-- 产品与功能点录入脚本（每新增一个产品，在此文件追加对应 SQL）
-- =============================================================================
-- 表说明：
--   product         - 产品（对外售卖项，product_en 需与前端 inquireCategories.feature 及 queryservicelogic productHandlers 一致）
--   feature         - 功能点/接口（api_id 需与天远接口及 apirequestService requestProcessors 一致）
--   product_feature - 产品与功能关联（一个产品可挂多个 feature，一般单接口产品为 1 条）
--
-- 若希望主键自增，可去掉各 INSERT 中的 id 列，由数据库自动分配。
-- 使用显式 id 时，请确保与现有数据不冲突（可先 SELECT MAX(id) 查看 product/feature/product_feature）。
-- =============================================================================

-- ------------------------------ 人车核验（简版）-----------------------------
-- product 39, feature 83, product_feature 148（示例，若已存在可跳过）
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        39,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '人车核验（简版）',
        'toc_PersonVehicleVerification',
        '<p>人车核验</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        83,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXGGB2Q',
        '人车核验（简版）',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        148,
        39,
        83,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 人车核验（详版）-----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        40,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '人车核验（详版）',
        'toc_PersonVehicleVerificationDetail',
        '<p>人车核验详版，提供更丰富的人车匹配详细信息。</p>',
        NULL,
        0.50,
        12.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        84,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXGYTS2',
        '人车核验（详版）',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        149,
        40,
        84,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 名下车辆(车牌) -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        41,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '名下车辆(车牌)',
        'toc_VehiclesUnderNamePlate',
        '<p>按身份证与姓名查询名下车辆信息。</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        85,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG5F3A',
        '名下车辆(车牌)',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        150,
        41,
        85,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 名下车辆(数量) -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        42,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '名下车辆(数量)',
        'toc_VehiclesUnderNameCount',
        '<p>查询名下车辆数量</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        86,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG4D2E',
        '名下车辆(数量)',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        151,
        42,
        86,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆静态信息查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        43,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆静态信息查询',
        'toc_VehicleStaticInfo',
        '<p>车辆静态信息查询</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        87,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG5U0Z',
        '车辆静态信息查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        152,
        43,
        87,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆里程记录(混合查询) -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        44,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆里程记录(混合查询)',
        'toc_VehicleMileageMixed',
        '<p>车辆里程记录混合查询</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        88,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG1U4U',
        '车辆里程记录(混合查询)',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        153,
        44,
        88,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 二手车VIN估值 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        45,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '二手车VIN估值',
        'toc_VehicleVinValuation',
        '<p>二手车VIN估值</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        89,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXGY7F2',
        '二手车VIN估值',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        154,
        45,
        89,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆过户简版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        46,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆过户简版查询',
        'toc_VehicleTransferSimple',
        '<p>车辆过户简版查询</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        90,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG1H7Y',
        '车辆过户简版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        155,
        46,
        90,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆过户详版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        47,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆过户详版查询',
        'toc_VehicleTransferDetail',
        '<p>车辆过户详版查询</p>',
        NULL,
        0.50,
        12.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        91,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG4I1Z',
        '车辆过户详版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        156,
        47,
        91,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆维保简版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        48,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆维保简版查询',
        'toc_VehicleMaintenanceSimple',
        '<p>车辆维保简版查询</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        92,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG3Y6B',
        '车辆维保简版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        157,
        48,
        92,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆维保详细版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        49,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆维保详细版查询',
        'toc_VehicleMaintenanceDetail',
        '<p>车辆维保详细版查询</p>',
        NULL,
        0.50,
        12.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        93,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG3Z3L',
        '车辆维保详细版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        158,
        49,
        93,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆出险详版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        50,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆出险详版查询',
        'toc_VehicleClaimDetail',
        '<p>车辆出险详版查询</p>',
        NULL,
        0.50,
        12.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        94,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXGP00W',
        '车辆出险详版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        159,
        50,
        94,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆出险记录核验 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        51,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆出险记录核验',
        'toc_VehicleClaimVerify',
        '<p>车辆出险记录核验</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        95,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG6B4E',
        '车辆出险记录核验',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        160,
        51,
        95,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- =============================================================================
-- 以后每加一个产品，按上面格式追加三块：
--   1. INSERT INTO product (..., product_name, product_en, ...)
--   2. INSERT INTO feature (..., api_id, name, ...)
--   3. INSERT INTO product_feature (..., product_id, feature_id, ...)
-- 注意：id 依次递增，或去掉 id 列改用自增。
-- =============================================================================