// ─── System ─────────────────────────────────────────────────────────────
'/health':{
get:{
tags:['System'],
summary:'Health check',
responses:{
200:{description:'Server đang chạy',content:{'application/json':{schema:{type:'object',properties:{status:{type:'string',example:'ok'},timestamp:{type:'string'}}}}}},
200:{description:'Đăng xuất thành công',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{message:{type:'string'}}}]}}}},
200:{
description:'Đăng xuất thành công',
content:{
'application/json':{
schema:{
allOf:[
{$ref:'#/components/schemas/SuccessResponse'},
{type:'object',properties:{message:{type:'string',example:'Logged out successfully'}}},
],
},
},
},
},
400:{description:'Token không tồn tại',content:{'application/json':{schema:{$ref:'#/components/schemas/ErrorResponse'}}}},
200:{description:'Thông tin user',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{data:{$ref:'#/components/schemas/User'}}}]}}}},
401:{$ref:'#/components/responses/Unauthorized'},
403:{$ref:'#/components/responses/Forbidden'},
404:{$ref:'#/components/responses/NotFound'},
},
},
put:{
tags:['Users'],
summary:'Cập nhật tài khoản (kích hoạt/đổi role)',
200:{description:'Cập nhật thành công',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{data:{$ref:'#/components/schemas/User'}}}]}}}},
200:{description:'Thông tin đơn',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{data:{$ref:'#/components/schemas/Application'}}}]}}}},
401:{$ref:'#/components/responses/Unauthorized'},
403:{$ref:'#/components/responses/Forbidden'},
404:{$ref:'#/components/responses/NotFound'},
},
},
delete:{
tags:['Applications'],
summary:'Xoá mềm đơn (Admin only — chỉ PENDING hoặc REJECTED)',
200:{description:'Đơn đã được xử lý',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{data:{$ref:'#/components/schemas/Application'}}}]}}}},
401:{$ref:'#/components/responses/Unauthorized'},
403:{$ref:'#/components/responses/Forbidden'},
404:{$ref:'#/components/responses/NotFound'},
409:{description:'Đơn không còn ở trạng thái PENDING',content:{'application/json':{schema:{$ref:'#/components/schemas/ErrorResponse'}}}},
200:{description:'Thông tin hồ sơ',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{data:{$ref:'#/components/schemas/Intern'}}}]}}}},
200:{description:'Hồ sơ đã cập nhật',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{data:{$ref:'#/components/schemas/Intern'}}}]}}}},
200:{description:'Thông tin công việc',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{data:{$ref:'#/components/schemas/Task'}}}]}}}},
200:{description:'Công việc đã được cập nhật',content:{'application/json':{schema:{allOf:[{$ref:'#/components/schemas/SuccessResponse'},{type:'object',properties:{data:{$ref:'#/components/schemas/Task'}}}]}}}},
// GET /interns?fullName=...&department=...&position=...&status=...&leaderId=...&discordRoleGranted=...&startDateFrom=...&startDateTo=...&sortBy=...&order=...&page=...&limit=...