-- =====================================================
-- 开放API接口字典数据 - V1.0.3
-- 执行时间: 2026-02-04
-- 说明: 新增学生完整数据接口 + 学校/年级/班级基础数据接口
-- =====================================================

-- 学生接口
INSERT INTO pg_api_dict (api_id, api_code, api_name, api_path, api_method, api_desc, status, order_num) VALUES 
(1700000000000000001, 'OPEN_STUDENT_LIST', '学生列表', '/open/api/student/list', 'GET', '开放API-学生列表分页查询（已脱敏）', '0', 10),
(1700000000000000002, 'OPEN_STUDENT_LIST_FULL', '学生列表(完整)', '/open/api/student/listFull', 'GET', '开放API-学生列表分页查询(完整数据不脱敏，需特殊授权)', '0', 20)
ON DUPLICATE KEY UPDATE 
    api_name = VALUES(api_name),
    api_path = VALUES(api_path),
    api_desc = VALUES(api_desc);

-- 学校接口
INSERT INTO pg_api_dict (api_id, api_code, api_name, api_path, api_method, api_desc, status, order_num) VALUES 
(1700000000000000010, 'OPEN_SCHOOL_LIST', '学校列表(分页)', '/open/api/base/school/list', 'GET', '开放API-学校列表分页查询', '0', 100),
(1700000000000000011, 'OPEN_SCHOOL_LIST_ALL', '学校列表(全部)', '/open/api/base/school/listAll', 'GET', '开放API-学校列表全部查询', '0', 101),
(1700000000000000012, 'OPEN_SCHOOL_INFO', '学校详情', '/open/api/base/school/{schoolId}', 'GET', '开放API-学校详情查询', '0', 102)
ON DUPLICATE KEY UPDATE 
    api_name = VALUES(api_name),
    api_path = VALUES(api_path),
    api_desc = VALUES(api_desc);

-- 年级接口
INSERT INTO pg_api_dict (api_id, api_code, api_name, api_path, api_method, api_desc, status, order_num) VALUES 
(1700000000000000020, 'OPEN_GRADE_LIST', '年级列表(分页)', '/open/api/base/grade/list', 'GET', '开放API-年级列表分页查询', '0', 110),
(1700000000000000021, 'OPEN_GRADE_LIST_ALL', '年级列表(全部)', '/open/api/base/grade/listAll', 'GET', '开放API-年级列表全部查询', '0', 111),
(1700000000000000022, 'OPEN_GRADE_INFO', '年级详情', '/open/api/base/grade/{gradeId}', 'GET', '开放API-年级详情查询', '0', 112)
ON DUPLICATE KEY UPDATE 
    api_name = VALUES(api_name),
    api_path = VALUES(api_path),
    api_desc = VALUES(api_desc);

-- 班级接口
INSERT INTO pg_api_dict (api_id, api_code, api_name, api_path, api_method, api_desc, status, order_num) VALUES 
(1700000000000000030, 'OPEN_CLASS_LIST', '班级列表(分页)', '/open/api/base/class/list', 'GET', '开放API-班级列表分页查询', '0', 120),
(1700000000000000031, 'OPEN_CLASS_LIST_ALL', '班级列表(全部)', '/open/api/base/class/listAll', 'GET', '开放API-班级列表全部查询', '0', 121),
(1700000000000000032, 'OPEN_CLASS_INFO', '班级详情', '/open/api/base/class/{classId}', 'GET', '开放API-班级详情查询', '0', 122)
ON DUPLICATE KEY UPDATE 
    api_name = VALUES(api_name),
    api_path = VALUES(api_path),
    api_desc = VALUES(api_desc);
