{"openapi":"3.0.0","info":{"title":"TM Agroteh Service API","description":"TM qishloq xo'jaligi texnikasi boshqaruvi uchun API","contact":{"name":"API Support","email":"support@agro.uz"},"version":"1.0.0"},"servers":[{"url":"https:\/\/old.uzagroin.uz","description":"Current Server"}],"paths":{"\/api\/v1\/tm\/applications":{"get":{"tags":["Applications"],"summary":"Arizalar ro'yxati","operationId":"23c7f15584851cd73afce563b71165ba","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"student_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"application_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"state_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":15}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Arizalar ro'yxati"},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Applications"],"summary":"Yangi ariza topshirish","operationId":"aa2d661ef534227987e57ba3eb7e9866","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":[]}}},"responses":{"201":{"description":"Ariza muvaffaqiyatli topshirildi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/applications\/{application}":{"get":{"tags":["Applications"],"summary":"Ariza ma'lumotlari","operationId":"8b9f34207d83f53edfc39e268c8836d5","parameters":[{"name":"application","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ariza ma'lumotlari"},"404":{"description":"Ariza topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Applications"],"summary":"Ariza ma'lumotlarini yangilash","operationId":"04fe82a7048f8c874f9565d56ebd4387","parameters":[{"name":"application","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":[]}}},"responses":{"200":{"description":"Ariza yangilandi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Applications"],"summary":"Arizani o'chirish","operationId":"d0da084eea501b50b46aed1e08752631","parameters":[{"name":"application","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ariza o'chirildi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/applications\/{id}\/restore":{"post":{"tags":["Applications"],"summary":"O'chirilgan arizani tiklash","operationId":"de10d9e9ba8a614a8f5460354ec51f85","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ariza tiklandi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/applications\/{application}\/approve":{"patch":{"tags":["Applications"],"summary":"Arizani tasdiqlash","operationId":"77379b5d753ef32ca73ced3ffef2c679","parameters":[{"name":"application","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ariza tasdiqlandi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/applications\/{application}\/reject":{"patch":{"tags":["Applications"],"summary":"Arizani rad etish","operationId":"4e21a1f1401b0d5a1ac23fdde3c7eec7","parameters":[{"name":"application","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["rejection_reason"],"properties":{"rejection_reason":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Ariza rad etildi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/applications\/{application}\/assign-exam":{"patch":{"tags":["Applications"],"summary":"Arizaga imtihon tayinlash","operationId":"732f7347aea1b6f49544cc23d2357b38","parameters":[{"name":"application","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Imtihon tayinlandi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/applications\/{application}\/upload\/{field}":{"post":{"tags":["Applications"],"summary":"Ariza faylini yuklash","operationId":"98d21ad5eff9e58f0c92dfcb517fbde3","parameters":[{"name":"application","in":"path","required":true,"schema":{"type":"integer"}},{"name":"field","in":"path","required":true,"schema":{"type":"string","enum":["training_certificate","medical_certificate","passport_copy","photo_3x4","fee_receipt","workplace_reference"]}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["file"],"properties":{"file":{"type":"string","format":"binary"}},"type":"object"}}}},"responses":{"200":{"description":"Fayl yuklandi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/applications\/{application}\/delete-file\/{field}":{"delete":{"tags":["Applications"],"summary":"Ariza faylini o'chirish","operationId":"723cfa7718209f418ef52cd852b54e6c","parameters":[{"name":"application","in":"path","required":true,"schema":{"type":"integer"}},{"name":"field","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Fayl o'chirildi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/applications\/statistics":{"get":{"tags":["Applications"],"summary":"Arizalar statistikasi","operationId":"c0d8bfbcb06a5a23a1ae1bab97043cdb","responses":{"200":{"description":"Statistika"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/certificates":{"get":{"tags":["Certificates"],"summary":"Guvohnomalar ro'yxati","operationId":"8d5a52bc8307781b6a5984a2647706a6","parameters":[{"name":"search","in":"query","description":"Guvohnoma raqami, FISH, JSHSHIR, pasport bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"tm_individual_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"country_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"status","in":"query","description":"Holat bo'yicha filter (active, exam_passed, data_attached)","required":false,"schema":{"type":"string"}},{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":15}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Guvohnomalar ro'yxati"},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Certificates"],"summary":"Yangi guvohnoma yaratish","operationId":"97757a44b5bcb5e66eb0f89e707801a8","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["tm_individual_id","issue_date","certificate_number"],"properties":{"tm_individual_id":{"description":"Jismoniy shaxs ID","type":"integer","example":1},"country_id":{"description":"Davlat ID","type":"integer","example":1},"issue_date":{"description":"Berilgan sana","type":"string","format":"date","example":"2026-01-15"},"certificate_number":{"description":"Guvohnoma seriya raqami","type":"string","example":"AA 0012345"},"category_a":{"description":"A toifa","type":"boolean","example":true},"category_b":{"description":"B toifa","type":"boolean","example":true},"category_c":{"description":"C toifa","type":"boolean","example":false},"category_d":{"description":"D toifa","type":"boolean","example":false},"category_e":{"description":"E toifa","type":"boolean","example":false},"category_f":{"description":"F toifa","type":"boolean","example":false}},"type":"object"}}}},"responses":{"201":{"description":"Guvohnoma muvaffaqiyatli yaratildi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/certificates\/{certificate}":{"get":{"tags":["Certificates"],"summary":"Guvohnoma ma'lumotlari","operationId":"199dc1ee605275a86ffbe7fb4f88e411","parameters":[{"name":"certificate","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma ma'lumotlari"},"404":{"description":"Guvohnoma topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Certificates"],"summary":"Guvohnoma ma'lumotlarini yangilash","operationId":"599af75698775d2923415b09381fffc7","parameters":[{"name":"certificate","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"tm_individual_id":{"description":"Jismoniy shaxs ID","type":"integer"},"country_id":{"description":"Davlat ID","type":"integer"},"issue_date":{"description":"Berilgan sana","type":"string","format":"date"},"certificate_number":{"description":"Guvohnoma seriya raqami","type":"string"},"category_a":{"description":"A toifa","type":"boolean"},"category_b":{"description":"B toifa","type":"boolean"},"category_c":{"description":"C toifa","type":"boolean"},"category_d":{"description":"D toifa","type":"boolean"},"category_e":{"description":"E toifa","type":"boolean"},"category_f":{"description":"F toifa","type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Guvohnoma yangilandi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Certificates"],"summary":"Guvohnomani o'chirish","operationId":"aefd4ce705a468347c74bdc60c93065c","parameters":[{"name":"certificate","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma o'chirildi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/certificates\/{id}\/restore":{"post":{"tags":["Certificates"],"summary":"O'chirilgan guvohnomani tiklash","operationId":"0e7469197de7efc33b2856fa872a970a","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma tiklandi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/certificates\/{certificate}\/toggle-status":{"patch":{"tags":["Certificates"],"summary":"Guvohnoma holatini almashtirish (faol\/nofaol)","operationId":"9d9106c0b7892c810e87a424ce693eca","parameters":[{"name":"certificate","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Holat o'zgartirildi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/certificates\/verify\/{qrToken}":{"get":{"tags":["Certificates"],"summary":"QR kod orqali guvohnomani tekshirish (ochiq)","description":"**Ochiq API** \u2014 autentifikatsiya kerak emas.\n\nQR kod skanerlanganda frontend sahifasi ochiladi:\n`https:\/\/new.uzagroin.uz\/verify\/certificate\/{qr_token}`\n\nFrontend shu API'ga so'rov yuboradi va guvohnoma ma'lumotlarini ko'rsatadi.\n\n### Qaytariladigan ma'lumotlar:\n- Guvohnoma raqami, berilgan sana, holati\n- Egasi: FIO, JSHSHIR, passport, tug'ilgan sana\n- Toifalar (A-F)\n- Viloyat, tuman","operationId":"d30b79a8b7c66c2e902aecdf3e381f45","parameters":[{"name":"qrToken","in":"path","description":"QR koddagi unique token","required":true,"schema":{"type":"string","example":"aBcDeFgHiJkLmNoPqRsTuVwXyZ012345"}}],"responses":{"200":{"description":"Guvohnoma ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"certificate_number":{"type":"string","example":"UZ-AA0155003"},"issue_date":{"type":"string","example":"2026-03-13"},"status":{"type":"string","example":"exam_passed"},"status_label":{"type":"string","example":"Imtihon topshirgan"},"is_active":{"type":"boolean","example":true},"categories":{"type":"array","items":{"type":"string"},"example":["A","B","C","D"]},"individual":{"properties":{"full_name":{"type":"string","example":"KARIMOV ALISHER BAXTIYOROVICH"},"jshshir":{"type":"string","example":"12345678901234"},"passport":{"type":"string","example":"AB1234567"},"birth_date":{"type":"string","example":"1990-05-15"},"state_name":{"type":"string","example":"Toshkent viloyati"},"city_name":{"type":"string","example":"Piskent"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Guvohnoma topilmadi"}}}},"\/api\/v1\/tm\/certificate-lookup":{"get":{"tags":["Certificate Lookup"],"summary":"Passport yoki JSHSHIR orqali guvohnoma qidirish","description":"Eski va yangi namunadagi guvohnomalardan passport yoki JSHSHIR bo'yicha qidirib, guvohnoma raqami, sanasi va toifalarini qaytaradi","operationId":"certificateLookup","parameters":[{"name":"passport","in":"query","description":"Passport raqami (masalan: AA1234567)","required":false,"schema":{"type":"string","example":"AA1234567"}},{"name":"jshshir","in":"query","description":"JSHSHIR (PINFL) raqami (14 ta raqam)","required":false,"schema":{"type":"string","example":"12345678901234"}}],"responses":{"200":{"description":"Guvohnoma(lar) topildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma(lar) topildi"},"data":{"type":"array","items":{"properties":{"source":{"description":"Qaysi jadvaldan (new_format \/ old_format)","type":"string","example":"new_format"},"certificate_number":{"type":"string","example":"UZ-AA0154681"},"issue_date":{"type":"string","format":"date","example":"2026-03-15"},"categories":{"type":"array","items":{"type":"string"},"example":"[\"A\", \"B\", \"C\"]"},"is_active":{"type":"boolean","example":true},"individual":{"properties":{"full_name":{"type":"string","example":"Karimov Jasur Anvarovich"},"passport":{"type":"string","example":"AA1234567"},"jshshir":{"type":"string","example":"12345678901234"}},"type":"object"}},"type":"object"}}},"type":"object"}}}},"404":{"description":"Guvohnoma topilmadi"},"422":{"description":"Passport yoki JSHSHIR kiritilishi shart"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/commission-members":{"get":{"tags":["Commission Members"],"summary":"Komissiya a'zolari ro'yxati","description":"Barcha komissiya a'zolari ro'yxatini olish. Qidiruv va filtrlash mumkin.","operationId":"b985516850dc9c72539fa79fd0fe2998","parameters":[{"name":"search","in":"query","description":"F.I.O, ish joyi, passport yoki telefon bo'yicha qidiruv","schema":{"type":"string"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","schema":{"type":"boolean"}},{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filter","schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","schema":{"type":"integer","default":15}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Muvaffaqiyatli","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/CommissionMemberResource"}}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Commission Members"],"summary":"Yangi komissiya a'zosi yaratish","operationId":"8ebe52dcb1db47eccf7f2786e2dea3ed","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["full_name"],"properties":{"full_name":{"description":"F.I.O (majburiy)","type":"string","example":"Karimov Anvar Baxtiyorovich"},"workplace_name":{"description":"Ish joyi","type":"string","example":"Agro Texnika MChJ"},"passport":{"description":"Passport","type":"string","example":"AB1234567"},"phone":{"description":"Telefon","type":"string","example":"+998901234567"},"state_id":{"description":"Viloyat ID","type":"integer","example":27},"city_id":{"description":"Tuman ID","type":"integer","example":2701}},"type":"object"}}}},"responses":{"201":{"description":"Yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#\/components\/schemas\/CommissionMemberResource"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/commission-members\/{commissionMember}":{"get":{"tags":["Commission Members"],"summary":"Komissiya a'zosi ma'lumotlari","operationId":"a3ab733ce9845a8a1ba275667c7755ff","parameters":[{"name":"commissionMember","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Muvaffaqiyatli","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#\/components\/schemas\/CommissionMemberResource"}},"type":"object"}}}},"404":{"description":"Topilmadi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Commission Members"],"summary":"Komissiya a'zosini yangilash","operationId":"6c8e94f0e2adb48fad252556bad01cdf","parameters":[{"name":"commissionMember","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"full_name":{"type":"string","example":"Karimov Anvar Baxtiyorovich"},"workplace_name":{"type":"string","example":"Agro Texnika MChJ"},"passport":{"type":"string","example":"AB1234567"},"phone":{"type":"string","example":"+998901234567"},"state_id":{"type":"integer","example":27},"city_id":{"type":"integer","example":2701},"is_active":{"type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"Yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#\/components\/schemas\/CommissionMemberResource"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Commission Members"],"summary":"Komissiya a'zosini o'chirish","operationId":"a9b908d5b1f53f9b993929a09ea7e76b","parameters":[{"name":"commissionMember","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"O'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/commission-members\/{id}\/restore":{"post":{"tags":["Commission Members"],"summary":"O'chirilgan komissiya a'zosini tiklash","operationId":"6b5e8ebb9a661d3349002d540b7677b2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Tiklandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#\/components\/schemas\/CommissionMemberResource"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/dashboard":{"get":{"tags":["Dashboard"],"summary":"Dashboard ma'lumotlari","description":"Barcha asosiy ko'rsatkichlarni bitta so'rovda qaytaradi: o'quvchilar, imtihonlar, guvohnomalar, o'quv markazlar, haftalik statistika, viloyatlar bo'yicha natijalar","operationId":"c567b5e32a242014686f878deb541b7c","responses":{"200":{"description":"Dashboard ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/DashboardResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/dashboard\/certificates":{"get":{"tags":["Dashboard"],"summary":"Oyma-oy guvohnomalar statistikasi","description":"Tanlangan yil bo'yicha har oyda yangi va eski namunadagi guvohnomalar soni","operationId":"58789fab4cd69d0f02bfd688d8be586f","parameters":[{"name":"year","in":"query","description":"Yil (default: joriy yil)","required":false,"schema":{"type":"integer","example":2026}}],"responses":{"200":{"description":"Oylik guvohnomalar statistikasi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/MonthlyCertificatesResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/exam-participants":{"get":{"tags":["Exam Participants"],"summary":"Imtihon qatnashuvchilari ro'yxati","description":"O'quv kursi tugagan, faol va 18 yoshga to'lgan o'quvchilarni qaytaradi. without_training_center=true bo'lganda nomzodlar uchun study_end_date talab qilinmaydi.","operationId":"497da9bae2c13d222d708d11dea5d341","parameters":[{"name":"search","in":"query","description":"Ism, familiya yoki JSHSHIR bo'yicha qidirish","required":false,"schema":{"type":"string"}},{"name":"without_training_center","in":"query","description":"O'quv markazi yo'q (NULL) bo'lganlarni olish","required":false,"schema":{"type":"boolean"}},{"name":"tm_training_center_id","in":"query","description":"O'quv markaz ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"study_class_category_ids[]","in":"query","description":"O'quv sinf kategoriyalari bo'yicha filter. Bir nechta ID yuborish mumkin.","required":false,"schema":{"type":"array","items":{"type":"integer"}},"example":[1,2]},{"name":"state_id","in":"query","description":"Viloyat ID","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","description":"Tuman ID","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"Sahifadagi elementlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Imtihon qatnashuvchilari ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"integer"},"full_name":{"type":"string"},"passport":{"type":"string","nullable":true},"jshshir":{"type":"string"},"phone":{"type":"string"},"birth_date":{"type":"string","format":"date","nullable":true},"study_class_categories":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Traktor haydovchilari"}},"type":"object"}},"theory_exam_attempts":{"type":"integer","example":2},"last_theory_exam_status":{"type":"string","example":"passed","nullable":true},"last_theory_exam_score":{"type":"number","example":85.5,"nullable":true},"theory_invoice_valid_until":{"type":"string","format":"date","nullable":true},"theory_invoice_is_expired":{"type":"boolean","example":false},"practical_exam_attempts":{"type":"integer","example":1},"last_practical_exam_passed":{"type":"boolean","nullable":true},"last_practical_exam_date":{"type":"string","format":"date","nullable":true},"workflow_status":{"properties":{"is_eligible":{"type":"boolean"},"theory_invoice_count":{"type":"integer"},"theory_exam_count":{"type":"integer"},"last_theory_exam_status":{"type":"string","nullable":true},"can_create_theory_invoice":{"type":"boolean"},"can_start_theory_exam":{"type":"boolean"},"can_create_theory_exam":{"type":"boolean"},"practical_invoice_count":{"type":"integer"},"practical_exam_sheet_count":{"type":"integer"},"practical_exam_passed":{"type":"boolean"},"can_create_practical_invoice":{"type":"boolean"},"can_create_practical_exam_sheet":{"type":"boolean"},"can_convert_to_individual":{"type":"boolean"},"is_converted":{"type":"boolean"}},"type":"object"}},"type":"object"}},"meta":{"properties":{"total":{"type":"integer"},"per_page":{"type":"integer"},"current_page":{"type":"integer"},"last_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"to":{"type":"integer","nullable":true}},"type":"object"},"links":{"properties":{"first":{"type":"string","nullable":true},"last":{"type":"string","nullable":true},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/exam-participants\/{student}\/status":{"get":{"tags":["Exam Participants"],"summary":"O'quvchi workflow holati","description":"O'quvchining imtihon jarayonidagi barcha bosqichlar holatini qaytaradi.","operationId":"0b17fba7c0b11e12cb06456cf063f89f","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Workflow holati"},"404":{"description":"O'quvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/exam-participants\/{student}\/history":{"get":{"tags":["Exam Participants"],"summary":"O'quvchi imtihon tarixi","operationId":"ed7b6a37101c338fd90b7f0a48c5c3fe","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Imtihon tarixi"},"404":{"description":"O'quvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/exam-participants\/{student}\/convert-to-individual":{"post":{"tags":["Exam Participants"],"summary":"O'quvchini jismoniy shaxsga o'tkazish","operationId":"15edb2b4dd27415bcb1ab31559888149","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"description":"Jismoniy shaxsga o'tkazildi"},"422":{"description":"O'tkazish mumkin emas"},"404":{"description":"O'quvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/instructions":{"get":{"tags":["TM Instructions"],"summary":"Yo'riqnomalar ro'yxati","description":"tm-republic barcha darajadagi yo'riqnomalarni ko'radi. Boshqa darajalar faqat o'z darajasidagi yo'riqnomalarni ko'radi.","operationId":"43b961dc3c93a16a4584f70ea5aec06b","parameters":[{"name":"search","in":"query","description":"Sarlavha bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"level","in":"query","description":"Daraja bo'yicha filter (faqat tm-republic uchun)","required":false,"schema":{"type":"string","enum":["republic","region","district","training_center"]}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Yo'riqnomalar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/InstructionResponse"}}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM Instructions"],"summary":"Yangi yo'riqnoma qo'shish","description":"Faqat tm-republic ruxsatiga ega foydalanuvchilar yaratishi mumkin.","operationId":"9244f1c6ef439a88d7ee08253a1de7a6","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"$ref":"#\/components\/schemas\/InstructionStoreRequest"}}}},"responses":{"201":{"description":"Yo'riqnoma muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Yo'riqnoma muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/InstructionResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/instructions\/{instruction}":{"get":{"tags":["TM Instructions"],"summary":"Yo'riqnoma ma'lumotlarini ko'rish","description":"tm-republic barcha darajadagi yo'riqnomani ko'rishi mumkin. Boshqa darajalar faqat o'z darajasidagini ko'radi.","operationId":"10f228e18981ad52b4d12a32fa3189fb","parameters":[{"name":"instruction","in":"path","description":"Yo'riqnoma ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Yo'riqnoma ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/InstructionResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q"},"404":{"description":"Yo'riqnoma topilmadi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["TM Instructions"],"summary":"Yo'riqnomani o'chirish","description":"Soft delete. Faqat tm-republic. S3 fayl saqlanadi.","operationId":"8626024752dd24754e9b4763cb84293f","parameters":[{"name":"instruction","in":"path","description":"Yo'riqnoma ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Yo'riqnoma o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Yo'riqnoma muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q"},"404":{"description":"Yo'riqnoma topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/instructions\/{instruction}\/update":{"post":{"tags":["TM Instructions"],"summary":"Yo'riqnomani yangilash","description":"Faqat tm-republic ruxsatiga ega foydalanuvchilar yangilashi mumkin. Yangi PDF yuklansa eski S3 dan o'chiriladi.","operationId":"72bacdb62ab259880e7bc31f14d2b898","parameters":[{"name":"instruction","in":"path","description":"Yo'riqnoma ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":false,"content":{"multipart\/form-data":{"schema":{"properties":{"title":{"type":"string","maxLength":500},"level":{"type":"string","enum":["republic","region","district","training_center"]},"file":{"description":"Yangi PDF fayl","type":"string","format":"binary"}},"type":"object"}}}},"responses":{"200":{"description":"Yo'riqnoma yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Yo'riqnoma muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/InstructionResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q"},"404":{"description":"Yo'riqnoma topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/locations\/regions":{"get":{"tags":["Locations"],"summary":"Barcha viloyatlar ro'yxati","description":"Foydalanuvchi hududig\u0430 qaramasdan barcha viloyatlarni qaytaradi","operationId":"10cba0f6278a7a1877fc84046904493f","responses":{"200":{"description":"Viloyatlar ro'yxati"},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/locations\/districts":{"get":{"tags":["Locations"],"summary":"Tumanlar ro'yxati","description":"Foydalanuvchi hududig\u0430 qaramasdan barcha tumanlarni qaytaradi. state_id bilan filterlash mumkin.","operationId":"588d8110209333a22d83f5c817c30c9e","parameters":[{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filterlash","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Tumanlar ro'yxati"},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/manage\/permissions":{"get":{"tags":["TM-Agroteh Permission Management"],"summary":"Ruxsatlar ro'yxati","description":"TM-Agroteh xizmatidagi barcha ruxsatlarni guruhlar bilan olish","operationId":"23db1391b232d0666100d05a99a37823","responses":{"200":{"description":"Ruxsatlar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/manage\/roles":{"get":{"tags":["TM-Agroteh Role Management"],"summary":"Rollar ro'yxati","description":"TM-Agroteh xizmatidagi barcha rollarni olish","operationId":"d7025b1ad5f0313e74ab67dc7936af76","parameters":[{"name":"with_users","in":"query","description":"Foydalanuvchilar sonini qo'shish","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Rollar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM-Agroteh Role Management"],"summary":"Yangi rol qo'shish","description":"TM-Agroteh xizmatiga yangi rol yaratish","operationId":"772db0eeb861b606a13f9c5c9465b435","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name"],"properties":{"name":{"description":"Rol nomi (faqat kichik harflar, raqamlar va tire)","type":"string","pattern":"^[a-z0-9-]+$"},"permissions":{"description":"Ruxsat ID lari","type":"array","items":{"type":"integer"}}},"type":"object"}}}},"responses":{"201":{"description":"Rol muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Rol muvaffaqiyatli yaratildi"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/manage\/roles\/{role}":{"get":{"tags":["TM-Agroteh Role Management"],"summary":"Rol ma'lumotlari","operationId":"97177ffae289009b51040618a1696905","parameters":[{"name":"role","in":"path","description":"Rol ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Rol ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Rol topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["TM-Agroteh Role Management"],"summary":"Rolni yangilash","description":"Rol ma'lumotlarini yangilash. Faqat o'zgartirilishi kerak bo'lgan maydonlarni yuboring.","operationId":"e36e232363197e65e61425e14f21b130","parameters":[{"name":"role","in":"path","description":"Rol ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"description":"Rol nomi (faqat kichik harflar, raqamlar va tire)","type":"string","pattern":"^[a-z0-9-]+$"},"permissions":{"description":"Ruxsat ID lari","type":"array","items":{"type":"integer"}}},"type":"object"}}}},"responses":{"200":{"description":"Rol yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Rol muvaffaqiyatli yangilandi"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Rol topilmadi"},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["TM-Agroteh Role Management"],"summary":"Rolni o'chirish","operationId":"0f22c8a494e05ba854fc6df8e901b9d2","parameters":[{"name":"role","in":"path","description":"Rol ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Rol o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Rol muvaffaqiyatli o'chirildi"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Rol topilmadi"},"422":{"description":"Bu rolga biriktirilgan foydalanuvchilar mavjud","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Bu rolga biriktirilgan foydalanuvchilar mavjud"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/manage\/roles\/{role}\/permissions":{"post":{"tags":["TM-Agroteh Role Management"],"summary":"Rol ruxsatlarini yangilash","description":"Rolga ruxsatlarni sinxronlash","operationId":"bdabcd0367e986476243188e7b0aca06","parameters":[{"name":"role","in":"path","description":"Rol ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["permissions"],"properties":{"permissions":{"description":"Ruxsat ID lari","type":"array","items":{"type":"integer"}}},"type":"object"}}}},"responses":{"200":{"description":"Ruxsatlar yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Ruxsatlar muvaffaqiyatli yangilandi"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Rol topilmadi"},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/manage\/users":{"get":{"tags":["TM-Agroteh User Management"],"summary":"Foydalanuvchilar ro'yxati","description":"TM-Agroteh xizmatidagi barcha foydalanuvchilarni filterlash va sahifalash bilan olish","operationId":"5e840fef1205aaae5ca28ac116aab1ee","parameters":[{"name":"search","in":"query","description":"Ism, familiya yoki email bo'yicha qidirish","required":false,"schema":{"type":"string","maxLength":255}},{"name":"is_active","in":"query","description":"Faollik holati","required":false,"schema":{"type":"boolean"}},{"name":"role_id","in":"query","description":"Rol ID bo'yicha filterlash","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"sort_by","in":"query","description":"Saralash maydoni","required":false,"schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","required":false,"schema":{"type":"string","default":"desc","enum":["asc","desc"]}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}}],"responses":{"200":{"description":"Foydalanuvchilar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM-Agroteh User Management"],"summary":"Yangi foydalanuvchi qo'shish","description":"TM-Agroteh xizmatiga yangi foydalanuvchi yaratish","operationId":"88cd2fa18c86754fd7d8c0c9572c538b","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","lastname","email","password","password_confirmation","roles"],"properties":{"name":{"description":"Foydalanuvchi ismi","type":"string","maxLength":255},"lastname":{"description":"Foydalanuvchi familiyasi","type":"string","maxLength":255},"email":{"description":"Email manzili (unikal)","type":"string","format":"email"},"password":{"description":"Parol (kamida 8 ta belgi)","type":"string","format":"password","minLength":8},"password_confirmation":{"description":"Parol tasdig'i","type":"string","format":"password"},"roles":{"description":"Rol ID lari","type":"array","items":{"type":"integer"}},"is_active":{"description":"Faollik holati","type":"boolean"},"phone":{"description":"Telefon raqami","type":"string"},"tm_training_center_id":{"description":"Ta'lim markazi ID","type":"integer","nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"Foydalanuvchi muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Foydalanuvchi muvaffaqiyatli yaratildi"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/manage\/users\/{user}":{"get":{"tags":["TM-Agroteh User Management"],"summary":"Foydalanuvchi ma'lumotlari","operationId":"69deddeabd055b22f171b17cc08bac93","parameters":[{"name":"user","in":"path","description":"Foydalanuvchi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Foydalanuvchi ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Foydalanuvchi topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["TM-Agroteh User Management"],"summary":"Foydalanuvchini yangilash","description":"Foydalanuvchi ma'lumotlarini yangilash. Faqat o'zgartirilishi kerak bo'lgan maydonlarni yuboring.","operationId":"9f509a5faadb0e20f6e4e8f2b352495c","parameters":[{"name":"user","in":"path","description":"Foydalanuvchi ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"description":"Foydalanuvchi ismi","type":"string","maxLength":255},"lastname":{"description":"Foydalanuvchi familiyasi","type":"string","maxLength":255},"email":{"description":"Email manzili (unikal)","type":"string","format":"email"},"password":{"description":"Parol (kamida 8 ta belgi)","type":"string","format":"password","minLength":8},"password_confirmation":{"description":"Parol tasdig'i","type":"string","format":"password"},"roles":{"description":"Rol ID lari","type":"array","items":{"type":"integer"}},"is_active":{"description":"Faollik holati","type":"boolean"},"phone":{"description":"Telefon raqami","type":"string"},"tm_training_center_id":{"description":"Ta'lim markazi ID","type":"integer","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Foydalanuvchi yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Foydalanuvchi muvaffaqiyatli yangilandi"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Foydalanuvchi topilmadi"},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["TM-Agroteh User Management"],"summary":"Foydalanuvchini o'chirish","operationId":"bc9479f4ae45a5fae3550d6441009c05","parameters":[{"name":"user","in":"path","description":"Foydalanuvchi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Foydalanuvchi o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Foydalanuvchi muvaffaqiyatli o'chirildi"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"O'zingizni o'chira olmaysiz"},"404":{"description":"Foydalanuvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/manage\/users\/{id}\/restore":{"post":{"tags":["TM-Agroteh User Management"],"summary":"O'chirilgan foydalanuvchini tiklash","operationId":"0ad105a171e4575eff4ed04a4a4ed48c","parameters":[{"name":"id","in":"path","description":"Foydalanuvchi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Foydalanuvchi tiklandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Foydalanuvchi muvaffaqiyatli tiklandi"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Foydalanuvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/manage\/users\/{user}\/toggle-status":{"post":{"tags":["TM-Agroteh User Management"],"summary":"Foydalanuvchi holatini o'zgartirish","description":"Foydalanuvchining is_active holatini teskari qiymatga o'zgartirish","operationId":"3ac7c3d0b4bb6809481e64ba6beb2ba5","parameters":[{"name":"user","in":"path","description":"Foydalanuvchi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Holat o'zgartirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Foydalanuvchi faollashtirildi"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Foydalanuvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/practical-exam-sheets":{"get":{"tags":["Practical Exam Sheets"],"summary":"Amaliy imtihon varaqalari ro'yxati","description":"Barcha amaliy imtihon varaqalari ro'yxatini olish. Qidiruv, filtrlash va sahifalash mumkin.","operationId":"175253293bab103fa810e35673e535a5","parameters":[{"name":"search","in":"query","description":"Imtihon raqami yoki tibbiy ko'rik raqami bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"date_from","in":"query","description":"Amaliy imtihon sanasi (dan)","required":false,"schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"Amaliy imtihon sanasi (gacha)","required":false,"schema":{"type":"string","format":"date"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Varaqalar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/PracticalExamSheetResponse"}},"meta":{"properties":{"total":{"type":"integer","example":50},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":4},"from":{"type":"integer","example":1},"to":{"type":"integer","example":15}},"type":"object"},"links":{"properties":{"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Practical Exam Sheets"],"summary":"Yangi amaliy imtihon varaqasi yaratish","description":"Yangi amaliy imtihon varaqasini yaratish. Komisiya a'zolari 3 ta bo'lishi shart.","operationId":"0efa02dcfd5a8b1eee4178e721c2af9e","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"$ref":"#\/components\/schemas\/PracticalExamSheetStoreRequest"}}}},"responses":{"201":{"description":"Varaqa muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Amaliy imtihon varaqasi muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/PracticalExamSheetResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/practical-exam-sheets\/{practicalExamSheet}":{"get":{"tags":["Practical Exam Sheets"],"summary":"Amaliy imtihon varaqasi ma'lumotlari","description":"Bitta amaliy imtihon varaqasining to'liq ma'lumotlarini olish.","operationId":"44d0a793cc89b64d236d8f95f51e5737","parameters":[{"name":"practicalExamSheet","in":"path","description":"Varaqa ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Varaqa ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/PracticalExamSheetResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Varaqa topilmadi"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Practical Exam Sheets"],"summary":"Amaliy imtihon varaqasini yangilash","description":"Amaliy imtihon varaqasi ma'lumotlarini yangilash. POST ishlatiladi chunki multipart\/form-data PUT ni qo'llab-quvvatlamaydi.","operationId":"42df686c3cae989a51fab26495250235","parameters":[{"name":"practicalExamSheet","in":"path","description":"Varaqa ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"$ref":"#\/components\/schemas\/PracticalExamSheetStoreRequest"}}}},"responses":{"200":{"description":"Varaqa yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Amaliy imtihon varaqasi muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/PracticalExamSheetResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Varaqa topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Practical Exam Sheets"],"summary":"Amaliy imtihon varaqasini o'chirish","description":"Amaliy imtihon varaqasini o'chirish. S3 dan hujjat fayli ham o'chiriladi.","operationId":"782ff7d4befee591ddafccdac9a5ced8","parameters":[{"name":"practicalExamSheet","in":"path","description":"Varaqa ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Varaqa o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Amaliy imtihon varaqasi muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Varaqa topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/practical-invoices":{"get":{"tags":["Practical Invoices"],"summary":"Invoicelar ro'yxati","description":"Amaliy imtihon invoicelari ro'yxatini olish. Qidiruv, filtrlash va sahifalash mumkin.","operationId":"5b0729ece06dd073d6802f6db13d4565","parameters":[{"name":"search","in":"query","description":"Invoice raqami, o'quvchi FISH yoki to'lov turi nomi bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"tm_student_id","in":"query","description":"O'quvchi ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"tm_practical_invoice_type_id","in":"query","description":"To'lov turi ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"date_from","in":"query","description":"Sana (dan)","required":false,"schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"Sana (gacha)","required":false,"schema":{"type":"string","format":"date"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Invoicelar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/PracticalInvoiceResponse"}},"meta":{"properties":{"total":{"type":"integer","example":50},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":4},"from":{"type":"integer","example":1},"to":{"type":"integer","example":15}},"type":"object"},"links":{"properties":{"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Practical Invoices"],"summary":"Yangi invoice yaratish","description":"Amaliy imtihon uchun yangi invoice yaratish. Nazariy imtihondan o'tgan bo'lishi shart. Invoice raqami avtomatik generatsiya qilinadi (yoki qo'lda kiritish mumkin).","operationId":"f3bb0bfa7907100738b52e520010bca7","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PracticalInvoiceStoreRequest"}}}},"responses":{"201":{"description":"Invoice muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Invoice muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/PracticalInvoiceResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object","example":"{\"tm_student_id\": [\"O'quvchi tanlanishi shart\"]}"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/practical-invoices\/statistics":{"get":{"tags":["Practical Invoices"],"summary":"Invoice statistikasi","description":"Jami, faol invoicelar soni va to'lov turi bo'yicha statistika.","operationId":"83a13f8764c0d696482a4b146d9d1b81","responses":{"200":{"description":"Invoice statistikasi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/PracticalInvoiceStatistics"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/practical-invoices\/{practicalInvoice}":{"get":{"tags":["Practical Invoices"],"summary":"Invoice ma'lumotlari","description":"Bitta invoicening to'liq ma'lumotlarini olish.","operationId":"1483477391238a8125e026a8b24d0fe5","parameters":[{"name":"practicalInvoice","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Invoice ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/PracticalInvoiceResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Invoice topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Practical Invoices"],"summary":"Invoice ma'lumotlarini yangilash","description":"Invoice ma'lumotlarini qisman yoki to'liq yangilash.","operationId":"2b7cd73f39ab16ee18486f0bb2cff8c1","parameters":[{"name":"practicalInvoice","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"tm_student_id":{"description":"O'quvchi ID","type":"integer","example":1},"tm_practical_invoice_type_id":{"description":"To'lov turi ID","type":"integer","example":1},"invoice_number":{"description":"Invoice raqami","type":"string","example":"PINV-2026-002","maxLength":255},"invoice_date":{"description":"Invoice sanasi","type":"string","format":"date","example":"2026-02-21"},"is_active":{"description":"Faol holat","type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"Invoice yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Invoice muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/PracticalInvoiceResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Invoice topilmadi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Practical Invoices"],"summary":"Invoiceni o'chirish","description":"Invoiceni o'chirish.","operationId":"d37626a36f403501f849b315b0754f45","parameters":[{"name":"practicalInvoice","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Invoice o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Invoice muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Invoice topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/practical-invoices\/{practicalInvoice}\/confirm-payment":{"patch":{"tags":["Practical Invoices"],"summary":"Invoice to'lovni tasdiqlash","description":"Invoice to'lov holatini o'zgartirish. is_paid=true bo'lganda paid_at avtomatik o'rnatiladi.","operationId":"d9af6e9b01a6e82f43fa1efd8cdc3a47","parameters":[{"name":"practicalInvoice","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["is_paid"],"properties":{"is_paid":{"description":"To'lov holati","type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"To'lov holati yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"To'lov muvaffaqiyatli tasdiqlandi"},"data":{"$ref":"#\/components\/schemas\/PracticalInvoiceResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Invoice topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/practical-invoice-types":{"get":{"tags":["Practical Invoice Types"],"summary":"To'lov turlari ro'yxati","description":"Amaliy imtihon to'lov turlari ro'yxatini olish. Qidiruv va filtrlash mumkin.","operationId":"4d1babc0fee609300e02363e3b734123","parameters":[{"name":"search","in":"query","description":"Nomi bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"To'lov turlari ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/PracticalInvoiceTypeResponse"}},"meta":{"properties":{"total":{"type":"integer","example":2},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":1},"from":{"type":"integer","example":1},"to":{"type":"integer","example":2}},"type":"object"},"links":{"properties":{"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Practical Invoice Types"],"summary":"Yangi to'lov turi yaratish","description":"Amaliy imtihon uchun yangi to'lov turini yaratish.","operationId":"cbc824438151f36e56ffa3ed1b12fe9a","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PracticalInvoiceTypeStoreRequest"}}}},"responses":{"201":{"description":"To'lov turi muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"To'lov turi muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/PracticalInvoiceTypeResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object","example":"{\"name\": [\"Nomi kiritilishi shart\"]}"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/practical-invoice-types\/{practicalInvoiceType}":{"get":{"tags":["Practical Invoice Types"],"summary":"To'lov turi ma'lumotlari","description":"Bitta to'lov turining to'liq ma'lumotlarini olish.","operationId":"e7a94ac47c66d70c5468a2604c54057d","parameters":[{"name":"practicalInvoiceType","in":"path","description":"To'lov turi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"To'lov turi ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/PracticalInvoiceTypeResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"To'lov turi topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Practical Invoice Types"],"summary":"To'lov turi ma'lumotlarini yangilash","description":"To'lov turi ma'lumotlarini qisman yoki to'liq yangilash.","operationId":"cececf43f512e7577b77bf279e20a2fc","parameters":[{"name":"practicalInvoiceType","in":"path","description":"To'lov turi ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"description":"To'lov turi nomi","type":"string","example":"Qayta amaliy imtihon uchun","maxLength":255},"amount":{"description":"Summa (tiyin)","type":"integer","example":2500000,"minimum":0},"is_active":{"description":"Faol holat","type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"To'lov turi yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"To'lov turi muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/PracticalInvoiceTypeResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"To'lov turi topilmadi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Practical Invoice Types"],"summary":"To'lov turini o'chirish","description":"To'lov turini o'chirish. Agar to'lov turiga bog'langan invoicelar mavjud bo'lsa, o'chirish mumkin emas.","operationId":"fb7881e6a970d9a96518fdcd071f3ba5","parameters":[{"name":"practicalInvoiceType","in":"path","description":"To'lov turi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"To'lov turi o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"To'lov turi muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"400":{"description":"To'lov turiga bog'langan invoicelar mavjud","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Bu to'lov turiga bog'langan invoicelar mavjud. Avval ularni o'chiring."}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"To'lov turi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/reports\/students":{"get":{"tags":["Reports"],"summary":"O'quvchilar hisoboti (drill-down)","description":"Foydalanuvchi permission darajasiga qarab hisobot qaytaradi:\n- **tm-republic**: Filtersiz \u2192 viloyatlar, +state_id \u2192 tumanlar, +city_id \u2192 o'quv markazlar, +training_center_id \u2192 **student ro'yxati**\n- **tm-region**: Filtersiz \u2192 tumanlar, +city_id \u2192 o'quv markazlar, +training_center_id \u2192 **student ro'yxati**\n- **tm-district**: Filtersiz \u2192 o'quv markazlar, +training_center_id \u2192 **student ro'yxati**\n- **tm-training-center**: **403 Forbidden**\n\n`training_center_id` berilganda aggregate emas, individual student ro'yxati (pagination bilan) qaytadi.\n\n**Ruxsat berilgan**: O'qishi tugagan + faol + 18 yoshdan katta\n**Ruxsat berilmagan**: Yuqoridagi shartlar bajarilmagan\n**O'qiyapti**: study_end_date kelmagan yoki belgilanmagan\n**Bitirgan**: study_end_date o'tgan","operationId":"d7aa94ea06085405d7666d53f49c6913","parameters":[{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","description":"Tuman ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"training_center_id","in":"query","description":"O'quv markaz ID bo'yicha filter (berilganda student ro'yxati qaytadi)","required":false,"schema":{"type":"integer"}},{"name":"date_from","in":"query","description":"Boshlanish sanasi (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"Tugash sanasi (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (default 15, -1=hammasi)","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer"}},{"name":"search","in":"query","description":"Qidiruv (familiya, ism, JSHSHIR, passport)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Hisobot ma'lumotlari yoki student ro'yxati (training_center_id berilganda)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Respublika bo'yicha hisobot"},"data":{"$ref":"#\/components\/schemas\/StudentReportResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Hisobot ko'rish uchun ruxsat yo'q"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/reports\/theory-exams":{"get":{"tags":["Reports"],"summary":"Nazariy imtihon hisoboti (drill-down)","description":"Foydalanuvchi permission darajasiga qarab nazariy imtihon hisobotini qaytaradi:\n- **tm-republic**: Filtersiz \u2192 viloyatlar, +state_id \u2192 tumanlar, +city_id \u2192 o'quv markazlar, +training_center_id \u2192 **qatnashuvchilar ro'yxati**\n- **tm-region**: Filtersiz \u2192 tumanlar, +city_id \u2192 o'quv markazlar, +training_center_id \u2192 **qatnashuvchilar ro'yxati**\n- **tm-district**: Filtersiz \u2192 o'quv markazlar, +training_center_id \u2192 **qatnashuvchilar ro'yxati**\n- **tm-training-center**: **403 Forbidden**\n\n`training_center_id` berilganda aggregate emas, imtihon qatnashuvchilari ro'yxati (exam-participants formati, pagination bilan) qaytadi.","operationId":"ecd552e0ad3fcde3eb51ac3f93004d5d","parameters":[{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","description":"Tuman ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"training_center_id","in":"query","description":"O'quv markaz ID (berilganda qatnashuvchilar ro'yxati qaytadi)","required":false,"schema":{"type":"integer"}},{"name":"date_from","in":"query","description":"Boshlanish sanasi (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"Tugash sanasi (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (default 15, -1=hammasi)","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer"}},{"name":"search","in":"query","description":"Qidiruv (familiya, ism, JSHSHIR, passport)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Hisobot ma'lumotlari yoki qatnashuvchilar ro'yxati (training_center_id berilganda)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nazariy imtihon hisoboti \u2014 Respublika bo'yicha"},"data":{"$ref":"#\/components\/schemas\/TheoryExamReportResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Hisobot ko'rish uchun ruxsat yo'q"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/reports\/practical-exams":{"get":{"tags":["Reports"],"summary":"Amaliy imtihon hisoboti (drill-down)","description":"Foydalanuvchi permission darajasiga qarab amaliy imtihon hisobotini qaytaradi:\n- **tm-republic**: Filtersiz \u2192 viloyatlar, +state_id \u2192 tumanlar, +city_id \u2192 o'quv markazlar, +training_center_id \u2192 **qatnashuvchilar ro'yxati**\n- **tm-region**: Filtersiz \u2192 tumanlar, +city_id \u2192 o'quv markazlar, +training_center_id \u2192 **qatnashuvchilar ro'yxati**\n- **tm-district**: Filtersiz \u2192 o'quv markazlar, +training_center_id \u2192 **qatnashuvchilar ro'yxati**\n- **tm-training-center**: **403 Forbidden**\n\n`training_center_id` berilganda aggregate emas, imtihon qatnashuvchilari ro'yxati (exam-participants formati, pagination bilan) qaytadi.","operationId":"06a35db0c087009947708658cec06647","parameters":[{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","description":"Tuman ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"training_center_id","in":"query","description":"O'quv markaz ID (berilganda qatnashuvchilar ro'yxati qaytadi)","required":false,"schema":{"type":"integer"}},{"name":"date_from","in":"query","description":"Boshlanish sanasi (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"Tugash sanasi (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (default 15, -1=hammasi)","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer"}},{"name":"search","in":"query","description":"Qidiruv (familiya, ism, JSHSHIR, passport)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Hisobot ma'lumotlari yoki qatnashuvchilar ro'yxati (training_center_id berilganda)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Amaliy imtihon hisoboti \u2014 Respublika bo'yicha"},"data":{"$ref":"#\/components\/schemas\/TheoryExamReportResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Hisobot ko'rish uchun ruxsat yo'q"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/reports\/certificates":{"get":{"tags":["Reports"],"summary":"Guvohnoma hisoboti (drill-down)","description":"Foydalanuvchi permission darajasiga qarab guvohnoma hisobotini qaytaradi:\n- **tm-republic**: Filtersiz \u2192 viloyatlar, +state_id \u2192 tumanlar, +city_id \u2192 o'quv markazlar\n- **tm-region**: Filtersiz \u2192 tumanlar, +city_id \u2192 o'quv markazlar\n- **tm-district**: Filtersiz \u2192 o'quv markazlar\n- **tm-training-center**: **403 Forbidden**\n\nHar bir qatorda: jami guvohnomalar, to'langan summa, yangi\/eski namuna soni va summasi","operationId":"e0447b5d7d1db7ea2ee2c343da87121a","parameters":[{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filter (drill-down: tumanlar)","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","description":"Tuman ID bo'yicha filter (drill-down: o'quv markazlar)","required":false,"schema":{"type":"integer"}},{"name":"training_center_id","in":"query","description":"O'quv markaz ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"date_from","in":"query","description":"Boshlanish sanasi (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"Tugash sanasi (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Hisobot ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma hisoboti \u2014 Respublika bo'yicha"},"data":{"$ref":"#\/components\/schemas\/CertificateReportResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"403":{"description":"Ruxsat yo'q","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Hisobot ko'rish uchun ruxsat yo'q"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/study-class-categories":{"get":{"tags":["Study Class Categories"],"summary":"O'quv sinf kategoriyalari ro'yxati","operationId":"65c18e425fee1e7d925540a70d4d30a0","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","example":"Traktor"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean","example":true}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","example":15,"default":15}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","example":1,"default":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"O'quv sinf kategoriyalari ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Traktor haydovchilari"},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Study Class Categories"],"summary":"Yangi o'quv sinf kategoriyasi qo'shish","operationId":"9bb919faf4a0c64ef7c660c7d827392e","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name"],"properties":{"name":{"description":"Kategoriya nomi","type":"string","example":"Traktor haydovchilari","maxLength":255},"is_active":{"description":"Faollik holati","type":"boolean","example":true,"nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"Kategoriya muvaffaqiyatli yaratildi"},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/study-class-categories\/{studyClassCategory}":{"get":{"tags":["Study Class Categories"],"summary":"O'quv sinf kategoriyasi ma'lumotlari","operationId":"179f4221af5854e57c11db6cc504b02d","parameters":[{"name":"studyClassCategory","in":"path","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Kategoriya ma'lumotlari"},"404":{"description":"Kategoriya topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Study Class Categories"],"summary":"O'quv sinf kategoriyasini yangilash","operationId":"3b19cf2dced6b6cedb6e6c4ece3444b6","parameters":[{"name":"studyClassCategory","in":"path","required":true,"schema":{"type":"integer","example":1}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"description":"Kategoriya nomi","type":"string","example":"Traktor haydovchilari","maxLength":255},"is_active":{"description":"Faollik holati","type":"boolean","example":true,"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Kategoriya yangilandi"},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Kategoriya topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Study Class Categories"],"summary":"O'quv sinf kategoriyasini o'chirish","operationId":"963bf5613739d3fdee010efc5bec172e","parameters":[{"name":"studyClassCategory","in":"path","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Kategoriya o'chirildi"},"404":{"description":"Kategoriya topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/study-class-categories\/{id}\/restore":{"post":{"tags":["Study Class Categories"],"summary":"O'chirilgan kategoriyani tiklash","operationId":"1e220945da7cb305e898d17d715d5d71","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Kategoriya tiklandi"},"404":{"description":"Kategoriya topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/study-class-categories\/{studyClassCategory}\/toggle-status":{"patch":{"tags":["Study Class Categories"],"summary":"Kategoriya holatini almashtirish (faol\/nofaol)","operationId":"59b70e9934a542d32b46acdb54832bd9","parameters":[{"name":"studyClassCategory","in":"path","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Holat o'zgartirildi"},"404":{"description":"Kategoriya topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/study-class-categories\/statistics":{"get":{"tags":["Study Class Categories"],"summary":"O'quv sinf kategoriyalari statistikasi","operationId":"9b998e9f7d9cdcd6c35d35476c40e141","responses":{"200":{"description":"Statistika","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"total":{"type":"integer","example":10},"active":{"type":"integer","example":8},"inactive":{"type":"integer","example":2}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/test-questions":{"get":{"tags":["Test Questions"],"summary":"Test savollari ro'yxati","description":"Barcha test savollarini filterlash va sahifalash bilan olish.","operationId":"2ed31597c95cf3f6746b4b6f0fc8480e","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":255}},{"name":"subject","in":"query","required":false,"schema":{"type":"string","enum":["yhq","ekspluatatsiya"]}},{"name":"study_category","in":"query","required":false,"schema":{"type":"string","enum":["A","B","C","D","E","F"]}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"study_class_category_ids[]","in":"query","description":"O'quv sinf kategoriyalari bo'yicha filter","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Test savollari ro'yxati"},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Test Questions"],"summary":"Yangi test savoli qo'shish","operationId":"cf1096d3531009abc48f7f51e098a4ef","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["subject","question_text","answer_a","answer_b","answer_c","correct_answer"],"properties":{"subject":{"type":"string","enum":["yhq","ekspluatatsiya"]},"study_category":{"type":"string","nullable":true,"enum":["A","B","C","D","E","F"]},"question_text":{"type":"string","maxLength":5000},"question_image":{"type":"string","format":"binary","nullable":true},"answer_a":{"type":"string","maxLength":1000},"answer_b":{"type":"string","maxLength":1000},"answer_c":{"type":"string","maxLength":1000},"correct_answer":{"type":"string","enum":["a","b","c"]},"study_class_category_ids":{"description":"O'quv sinf kategoriyalari ID lari","type":"array","items":{"type":"integer"},"nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"Savol muvaffaqiyatli yaratildi"},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/test-questions\/{testQuestion}":{"get":{"tags":["Test Questions"],"summary":"Test savoli ma'lumotlari","operationId":"21b29ae568dc1ebd42cebe21b7402970","parameters":[{"name":"testQuestion","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Test savoli ma'lumotlari"},"404":{"description":"Savol topilmadi"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Test Questions"],"summary":"Test savolini yangilash","description":"_method=PUT query parametri shart.","operationId":"ba9ef4350eb18b8a09952f205c562da5","parameters":[{"name":"testQuestion","in":"path","required":true,"schema":{"type":"integer"}},{"name":"_method","in":"query","required":true,"schema":{"type":"string","default":"PUT"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"properties":{"subject":{"type":"string","enum":["yhq","ekspluatatsiya"]},"study_category":{"type":"string","nullable":true,"enum":["A","B","C","D","E","F"]},"question_text":{"type":"string","maxLength":5000},"question_image":{"type":"string","format":"binary","nullable":true},"answer_a":{"type":"string","maxLength":1000},"answer_b":{"type":"string","maxLength":1000},"answer_c":{"type":"string","maxLength":1000},"correct_answer":{"type":"string","enum":["a","b","c"]},"study_class_category_ids":{"description":"Yuborilsa \u2014 to'liq almashtiradi. Bo'sh array [] \u2014 barchasini o'chiradi.","type":"array","items":{"type":"integer"},"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Savol yangilandi"},"404":{"description":"Savol topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Test Questions"],"summary":"Test savolini o'chirish","operationId":"24b8f660bf8c3e77bf0d04dd307b5867","parameters":[{"name":"testQuestion","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Savol o'chirildi"},"404":{"description":"Savol topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/test-questions\/{id}\/restore":{"post":{"tags":["Test Questions"],"summary":"O'chirilgan savolni tiklash","operationId":"f32682617d5eb6d3804539248656035c","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Savol tiklandi"},"404":{"description":"Savol topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/test-questions\/subjects":{"get":{"tags":["Test Questions"],"summary":"Test turlari ro'yxati","operationId":"51843b01e9f65a92da90b19e32ea58a9","responses":{"200":{"description":"Test turlari ro'yxati"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/test-questions\/random":{"get":{"tags":["Test Questions"],"summary":"Tasodifiy savollar to'plami","description":"Imtihon uchun tasodifiy savollar olish.","operationId":"46d77e7fd58af1f23bc87d408204cab5","parameters":[{"name":"subject","in":"query","required":true,"schema":{"type":"string","enum":["yhq","ekspluatatsiya"]}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"maximum":100,"minimum":1}},{"name":"study_category","in":"query","required":false,"schema":{"type":"string","nullable":true,"enum":["A","B","C","D","E","F"]}},{"name":"study_class_category_ids[]","in":"query","description":"Kategoriya bo'yicha filter","required":false,"schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"Tasodifiy savollar"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/test-questions\/statistics":{"get":{"tags":["Test Questions"],"summary":"Test savollari statistikasi","operationId":"928717731b74b4c3b98f09e12fb5447f","responses":{"200":{"description":"Statistika"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/test-questions\/{testQuestion}\/transliterate":{"post":{"tags":["Test Questions"],"summary":"Savol matnini transliteratsiya qilish","description":"Savol va javoblarning kirill versiyasini avtomatik yaratish (lotin \u2192 kirill)","operationId":"e383499d9a0502fa826e9cf6d06d2e47","parameters":[{"name":"testQuestion","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Transliteratsiya natijasi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-exams":{"get":{"tags":["Theory Exams"],"summary":"Nazariy imtihonlar ro'yxati","operationId":"f7a3c790e7fb6a8e228d53f693b10024","parameters":[{"name":"student_id","in":"query","description":"Talaba ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"subject","in":"query","description":"Fan bo'yicha filter (eski examlar uchun)","required":false,"schema":{"type":"string","enum":["yhq","ekspluatatsiya"]}},{"name":"status","in":"query","description":"Status bo'yicha filter","required":false,"schema":{"type":"string","enum":["pending","in_progress","passed","failed","expired"]}},{"name":"per_page","in":"query","description":"Sahifadagi elementlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Nazariy imtihonlar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TheoryExam"}},"meta":{"properties":{"total":{"type":"integer"},"per_page":{"type":"integer"},"current_page":{"type":"integer"},"last_page":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-exams\/{theoryExam}":{"get":{"tags":["Theory Exams"],"summary":"Nazariy imtihon ma'lumotlari","operationId":"e973df481612962aec4fcab165208910","parameters":[{"name":"theoryExam","in":"path","description":"Nazariy imtihon ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Nazariy imtihon ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#\/components\/schemas\/TheoryExam"}},"type":"object"}}}},"404":{"description":"Nazariy imtihon topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Theory Exams"],"summary":"Nazariy imtihonni tahrirlash","description":"Imtihon statusini, natijasini o'zgartirish (faqat respublika admin uchun)","operationId":"a9b4f16aec1dbf456667acf041d13d1f","parameters":[{"name":"theoryExam","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","enum":["pending","in_progress","passed","failed","expired"]},"score_percent":{"type":"number","example":85.5},"correct_count":{"type":"integer","example":13}},"type":"object"}}}},"responses":{"200":{"description":"Imtihon yangilandi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Theory Exams"],"summary":"Nazariy imtihonni o'chirish (pending yoki in_progress)","operationId":"09261b587e5563aa4ef91805515999bc","parameters":[{"name":"theoryExam","in":"path","description":"Nazariy imtihon ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Nazariy imtihon o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nazariy imtihon muvaffaqiyatli o'chirildi"}},"type":"object"}}}},"409":{"description":"Faqat kutilayotgan yoki jarayondagi imtihonni o'chirish mumkin"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-exams\/start":{"post":{"tags":["Theory Exams"],"summary":"Nazariy imtihonni boshlash (yaratish + savollar generatsiya)","description":"Talaba uchun nazariy imtihon yaratadi va darhol boshlaydi. 15 ta aralash savol (ekspluatatsiya + YHQ), 15 daqiqa vaqt chegarasi, 80% o'tish chegarasi.","operationId":"aa83fae872f75397db4574749b4fba27","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["student_id"],"properties":{"student_id":{"description":"Talaba ID (tm_students)","type":"integer"}},"type":"object"}}}},"responses":{"201":{"description":"Nazariy imtihon boshlandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nazariy imtihon boshlandi"},"data":{"properties":{"theory_exam":{"$ref":"#\/components\/schemas\/TheoryExam"},"questions":{"type":"array","items":{"properties":{"id":{"type":"integer"},"question_text":{"type":"string"},"question_image":{"type":"string","nullable":true},"answer_a":{"type":"string"},"answer_b":{"type":"string"},"answer_c":{"type":"string"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"409":{"description":"Imtihonni boshlash mumkin emas yoki yetarli savollar topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-exams\/{theoryExam}\/submit-answer":{"post":{"tags":["Theory Exams"],"summary":"Savolga javob berish","description":"Imtihon jarayonida savolga javob berish. Agar vaqt tugagan bo'lsa avtomatik expired bo'ladi.","operationId":"6bbef1dfebe3466f50ac1bca6fc9a412","parameters":[{"name":"theoryExam","in":"path","description":"Nazariy imtihon ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["question_id","selected_answer"],"properties":{"question_id":{"description":"Savol ID (tm_test_questions)","type":"integer"},"selected_answer":{"description":"Tanlangan javob","type":"string","enum":["a","b","c"]}},"type":"object"}}}},"responses":{"200":{"description":"Javob qabul qilindi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Javob qabul qilindi"},"data":{"properties":{"question_id":{"type":"integer"},"is_correct":{"type":"boolean"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Savol imtihonda topilmadi"},"409":{"description":"Imtihon jarayonda emas yoki vaqt tugagan"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-exams\/{theoryExam}\/complete":{"patch":{"tags":["Theory Exams"],"summary":"Nazariy imtihonni yakunlash (auto-baholash)","description":"Imtihonni yakunlash va natijalarni hisoblash. Agar vaqt tugagan bo'lsa expired status beriladi.","operationId":"f638e7c4ad8b16ae51a1de87a9e75d6c","parameters":[{"name":"theoryExam","in":"path","description":"Nazariy imtihon ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Nazariy imtihon yakunlandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nazariy imtihon yakunlandi. Natija: o'tdi (86.67%)"},"data":{"$ref":"#\/components\/schemas\/TheoryExam"}},"type":"object"}}}},"409":{"description":"Imtihon jarayonda emas"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-exams\/{theoryExam}\/result":{"get":{"tags":["Theory Exams"],"summary":"Nazariy imtihon natijasi (savollar va javoblar bilan)","description":"Imtihon natijasini ko'rish. Yakunlangan testda correct_answer ko'rsatiladi, jarayondagi testda yashiriladi.","operationId":"4b284aec3ee08053639b38fcd2cde0b4","parameters":[{"name":"theoryExam","in":"path","description":"Nazariy imtihon ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Imtihon natijasi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"theory_exam":{"$ref":"#\/components\/schemas\/TheoryExam"},"answers":{"type":"array","items":{"properties":{"question_id":{"type":"integer"},"question_text":{"type":"string"},"answer_a":{"type":"string"},"answer_b":{"type":"string"},"answer_c":{"type":"string"},"correct_answer":{"description":"Faqat yakunlangan testda ko'rsatiladi","type":"string","nullable":true,"enum":["a","b","c"]},"selected_answer":{"type":"string","nullable":true,"enum":["a","b","c"]},"is_correct":{"type":"boolean"},"answered_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-exams\/statistics":{"get":{"tags":["Theory Exams"],"summary":"Nazariy imtihonlar statistikasi","operationId":"9e18615325e0464db091df294f76c699","responses":{"200":{"description":"Statistika","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"total":{"type":"integer"},"by_status":{"properties":{"pending":{"type":"integer"},"in_progress":{"type":"integer"},"passed":{"type":"integer"},"failed":{"type":"integer"},"expired":{"type":"integer"}},"type":"object"},"average_score":{"type":"number","format":"float","nullable":true}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-invoices":{"get":{"tags":["Theory Invoices"],"summary":"Invoicelar ro'yxati","description":"Nazariy imtihon invoicelari ro'yxatini olish. Qidiruv, filtrlash va sahifalash mumkin.","operationId":"54d3bc1a75f9c870549e57a3d81492fe","parameters":[{"name":"search","in":"query","description":"Invoice raqami, o'quvchi FISH yoki to'lov turi nomi bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"tm_student_id","in":"query","description":"O'quvchi ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"tm_theory_invoice_type_id","in":"query","description":"To'lov turi ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"date_from","in":"query","description":"Sana (dan)","required":false,"schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"Sana (gacha)","required":false,"schema":{"type":"string","format":"date"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Invoicelar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TheoryInvoiceResponse"}},"meta":{"properties":{"total":{"type":"integer","example":50},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":4},"from":{"type":"integer","example":1},"to":{"type":"integer","example":15}},"type":"object"},"links":{"properties":{"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Theory Invoices"],"summary":"Yangi invoice yaratish","description":"Nazariy imtihon uchun yangi invoice yaratish. O'quvchi eligible bo'lishi shart. Invoice raqami avtomatik generatsiya qilinadi (yoki qo'lda kiritish mumkin).","operationId":"9c66d649a98cc00d1a7367366bbb85ff","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TheoryInvoiceStoreRequest"}}}},"responses":{"201":{"description":"Invoice muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Invoice muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/TheoryInvoiceResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object","example":"{\"tm_student_id\": [\"O'quvchi tanlanishi shart\"]}"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-invoices\/statistics":{"get":{"tags":["Theory Invoices"],"summary":"Invoice statistikasi","description":"Jami, faol invoicelar soni va to'lov turi bo'yicha statistika.","operationId":"9e48ff4ef59b341579ef729237468998","responses":{"200":{"description":"Invoice statistikasi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/TheoryInvoiceStatistics"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-invoices\/{theoryInvoice}":{"get":{"tags":["Theory Invoices"],"summary":"Invoice ma'lumotlari","description":"Bitta invoicening to'liq ma'lumotlarini olish.","operationId":"9e32d586dd3f571832f4ddbc5bd1d201","parameters":[{"name":"theoryInvoice","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Invoice ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/TheoryInvoiceResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Invoice topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Theory Invoices"],"summary":"Invoice ma'lumotlarini yangilash","description":"Invoice ma'lumotlarini qisman yoki to'liq yangilash.","operationId":"ca83fff556c25e39a36f21fbe0fde595","parameters":[{"name":"theoryInvoice","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"tm_student_id":{"description":"O'quvchi ID","type":"integer","example":1},"tm_theory_invoice_type_id":{"description":"To'lov turi ID","type":"integer","example":1},"invoice_number":{"description":"Invoice raqami","type":"string","example":"INV-2026-002","maxLength":255},"invoice_date":{"description":"Invoice sanasi","type":"string","format":"date","example":"2026-02-19"},"is_active":{"description":"Faol holat","type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"Invoice yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Invoice muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/TheoryInvoiceResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Invoice topilmadi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Theory Invoices"],"summary":"Invoiceni o'chirish","description":"Invoiceni o'chirish.","operationId":"d0b4d465123f31c83b311be77758bbca","parameters":[{"name":"theoryInvoice","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Invoice o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Invoice muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Invoice topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-invoices\/{theoryInvoice}\/confirm-payment":{"patch":{"tags":["Theory Invoices"],"summary":"Invoice to'lovni tasdiqlash","description":"Invoice to'lov holatini o'zgartirish. is_paid=true bo'lganda paid_at avtomatik o'rnatiladi.","operationId":"4e43a8bad16bfe2546de093517bd8c62","parameters":[{"name":"theoryInvoice","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["is_paid"],"properties":{"is_paid":{"description":"To'lov holati","type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"To'lov holati yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"To'lov muvaffaqiyatli tasdiqlandi"},"data":{"$ref":"#\/components\/schemas\/TheoryInvoiceResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Invoice topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-invoice-types":{"get":{"tags":["Theory Invoice Types"],"summary":"To'lov turlari ro'yxati","description":"Nazariy imtihon to'lov turlari ro'yxatini olish. Qidiruv va filtrlash mumkin.","operationId":"366c8f3c730034ea54ce32a6e0d72bf1","parameters":[{"name":"search","in":"query","description":"Nomi bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"To'lov turlari ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TheoryInvoiceTypeResponse"}},"meta":{"properties":{"total":{"type":"integer","example":2},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":1},"from":{"type":"integer","example":1},"to":{"type":"integer","example":2}},"type":"object"},"links":{"properties":{"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Theory Invoice Types"],"summary":"Yangi to'lov turi yaratish","description":"Nazariy imtihon uchun yangi to'lov turini yaratish.","operationId":"37dbb3f158034bc2fe334c3be370838c","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TheoryInvoiceTypeStoreRequest"}}}},"responses":{"201":{"description":"To'lov turi muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"To'lov turi muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/TheoryInvoiceTypeResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object","example":"{\"name\": [\"Nomi kiritilishi shart\"]}"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/theory-invoice-types\/{theoryInvoiceType}":{"get":{"tags":["Theory Invoice Types"],"summary":"To'lov turi ma'lumotlari","description":"Bitta to'lov turining to'liq ma'lumotlarini olish.","operationId":"c239963154d53aa444a7269b1e250f0b","parameters":[{"name":"theoryInvoiceType","in":"path","description":"To'lov turi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"To'lov turi ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/TheoryInvoiceTypeResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"To'lov turi topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Theory Invoice Types"],"summary":"To'lov turi ma'lumotlarini yangilash","description":"To'lov turi ma'lumotlarini qisman yoki to'liq yangilash.","operationId":"c659881271edcddeccf0488013d6ad5a","parameters":[{"name":"theoryInvoiceType","in":"path","description":"To'lov turi ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"description":"To'lov turi nomi","type":"string","example":"Har bir qayta nazariy imtihon topshirish uchun","maxLength":255},"amount":{"description":"Summa (tiyin)","type":"integer","example":2500000,"minimum":0},"is_active":{"description":"Faol holat","type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"To'lov turi yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"To'lov turi muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/TheoryInvoiceTypeResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"To'lov turi topilmadi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Theory Invoice Types"],"summary":"To'lov turini o'chirish","description":"To'lov turini o'chirish. Agar to'lov turiga bog'langan invoicelar mavjud bo'lsa, o'chirish mumkin emas.","operationId":"b301c2546a6178fbe2afde0b3b44c7ea","parameters":[{"name":"theoryInvoiceType","in":"path","description":"To'lov turi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"To'lov turi o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"To'lov turi muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"400":{"description":"To'lov turiga bog'langan invoicelar mavjud","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Bu to'lov turiga bog'langan invoicelar mavjud. Avval ularni o'chiring."}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"To'lov turi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/candidates":{"get":{"tags":["TM Candidates"],"summary":"Nomzodlar ro'yxati","description":"O'quv markazi yo'q (tm_training_center_id = NULL) studentlar ro'yxati. Qidiruv (FISH, JSHSHIR, pasport, telefon), filtrlash va sahifalash mumkin.","operationId":"0fba419aea7823740bc6adbc236c059e","parameters":[{"name":"search","in":"query","description":"FISH, JSHSHIR, pasport, telefon bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","description":"Tuman ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Nomzodlar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TmCandidateResponse"}},"meta":{"properties":{"total":{"type":"integer","example":50},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":4}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM Candidates"],"summary":"Yangi nomzod qo'shish","description":"Yangi nomzod yaratish (tm_students jadvaliga, tm_training_center_id = NULL). Familiya va ism majburiy.","operationId":"6ca2c49213b92ad2d32d885dec0c0cbc","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TmCandidateStoreRequest"}}}},"responses":{"201":{"description":"Nomzod muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nomzod muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/TmCandidateResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi"},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/candidates\/{candidate}":{"get":{"tags":["TM Candidates"],"summary":"Nomzod ma'lumotlari","description":"Bitta nomzodning to'liq ma'lumotlarini olish.","operationId":"2710d7a39a790aff494e8854725da406","parameters":[{"name":"candidate","in":"path","description":"Nomzod ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Nomzod ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#\/components\/schemas\/TmCandidateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Nomzod topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["TM Candidates"],"summary":"Nomzod ma'lumotlarini yangilash","description":"Nomzod ma'lumotlarini qisman yoki to'liq yangilash.","operationId":"30d80d5643c9db3fa5116f0fab8c0b38","parameters":[{"name":"candidate","in":"path","description":"Nomzod ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"lastname":{"type":"string","example":"Karimov"},"firstname":{"type":"string","example":"Jamshid"},"middle_name":{"type":"string","example":"Botirovich","nullable":true},"passport":{"type":"string","example":"AB7654321","nullable":true},"birth_date":{"type":"string","format":"date","example":"1997-04-12","nullable":true},"jshshir":{"type":"string","example":"40412199700001","nullable":true},"phone":{"type":"string","example":"+998901112233","nullable":true},"state_id":{"type":"integer","example":1,"nullable":true},"city_id":{"type":"integer","example":1,"nullable":true},"address":{"type":"string","example":"Manzil","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Nomzod yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nomzod muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/TmCandidateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Nomzod topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["TM Candidates"],"summary":"Nomzodni o'chirish","description":"Nomzodni o'chirish (soft delete).","operationId":"fe43741b881dc9afd645bfb0aca9e6bf","parameters":[{"name":"candidate","in":"path","description":"Nomzod ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Nomzod o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nomzod muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Nomzod topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/candidates\/{id}\/restore":{"post":{"tags":["TM Candidates"],"summary":"O'chirilgan nomzodni tiklash","description":"Soft delete qilingan nomzodni tiklash.","operationId":"0772b1d1155009b263090f51172194b7","parameters":[{"name":"id","in":"path","description":"Nomzod ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Nomzod tiklandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nomzod muvaffaqiyatli tiklandi"},"data":{"$ref":"#\/components\/schemas\/TmCandidateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Nomzod topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/candidates\/{candidate}\/toggle-status":{"patch":{"tags":["TM Candidates"],"summary":"Nomzod holatini almashtirish","description":"Nomzodni faol\/nofaol qilish.","operationId":"8f298074b871145c73f4d1223ef33025","parameters":[{"name":"candidate","in":"path","description":"Nomzod ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Holat o'zgartirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Nomzod holati faol qilindi"},"data":{"$ref":"#\/components\/schemas\/TmCandidateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Nomzod topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/certificate-bases":{"get":{"tags":["TM Certificate Bases"],"summary":"Guvohnoma asoslari ro'yxati","description":"Barcha guvohnoma asoslari ro'yxatini olish. Qidiruv, filtrlash va sahifalash mumkin.","operationId":"fdbfebace385cf85356e5f14141e71d3","parameters":[{"name":"search","in":"query","description":"Nomi bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Guvohnoma asoslari ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TmCertificateBasisResponse"}},"meta":{"properties":{"total":{"type":"integer","example":5},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":1},"from":{"type":"integer","example":1},"to":{"type":"integer","example":5}},"type":"object"},"links":{"properties":{"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM Certificate Bases"],"summary":"Yangi guvohnoma asosi qo'shish","description":"Yangi guvohnoma asosini yaratish.","operationId":"a8f6cb71c3a10a764260b2bc71ebe484","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TmCertificateBasisStoreRequest"}}}},"responses":{"201":{"description":"Guvohnoma asosi muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma asosi muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/TmCertificateBasisResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/certificate-bases\/{certificateBasis}":{"get":{"tags":["TM Certificate Bases"],"summary":"Guvohnoma asosi ma'lumotlarini ko'rish","description":"Bitta guvohnoma asosining ma'lumotlarini olish.","operationId":"fe40a07ee2d44c21ef9ae5a8e3b5d361","parameters":[{"name":"certificateBasis","in":"path","description":"Guvohnoma asosi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma asosi ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/TmCertificateBasisResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Guvohnoma asosi topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["TM Certificate Bases"],"summary":"Guvohnoma asosi ma'lumotlarini yangilash","description":"Guvohnoma asosi ma'lumotlarini yangilash.","operationId":"f8a4284595648fba2b877592ce07e6b5","parameters":[{"name":"certificateBasis","in":"path","description":"Guvohnoma asosi ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TmCertificateBasisStoreRequest"}}}},"responses":{"200":{"description":"Guvohnoma asosi yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma asosi muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/TmCertificateBasisResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Guvohnoma asosi topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["TM Certificate Bases"],"summary":"Guvohnoma asosini o'chirish","description":"Guvohnoma asosini o'chirish.","operationId":"f355dbd91dbd042ab9db6ebc837f5084","parameters":[{"name":"certificateBasis","in":"path","description":"Guvohnoma asosi ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma asosi o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma asosi muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Guvohnoma asosi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individual-certificates":{"get":{"tags":["TM Individual Certificates"],"summary":"Jismoniy shaxs guvohnomalari ro'yxati","description":"Barcha jismoniy shaxs guvohnomalari ro'yxatini olish. Qidiruv, filtrlash va sahifalash mumkin.","operationId":"4a0bdae77757b45497cd0ad05fceb2a1","parameters":[{"name":"search","in":"query","description":"Guvohnoma raqami, FISH, JSHSHIR, pasport bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"tm_individual_id","in":"query","description":"Jismoniy shaxs ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"tm_certificate_basis_id","in":"query","description":"Guvohnoma asosi ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"status","in":"query","description":"Status bo'yicha filter (pending\/approved\/rejected\/issued)","required":false,"schema":{"type":"string"}},{"name":"payment_status","in":"query","description":"To'lov holati (unpaid\/paid\/partial)","required":false,"schema":{"type":"string"}},{"name":"is_paid","in":"query","description":"To'langan filter","required":false,"schema":{"type":"boolean"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Guvohnomalar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TmIndividualCertificateResponse"}},"meta":{"properties":{"total":{"type":"integer","example":50},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":4},"from":{"type":"integer","example":1},"to":{"type":"integer","example":15}},"type":"object"},"links":{"properties":{"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM Individual Certificates"],"summary":"Yangi guvohnoma yaratish","description":"Jismoniy shaxs uchun yangi guvohnoma yaratish. Fayllar multipart\/form-data orqali yuboriladi.","operationId":"075f953bbe0a1466dd3df6ad540c243a","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"$ref":"#\/components\/schemas\/TmIndividualCertificateStoreRequest"}}}},"responses":{"201":{"description":"Guvohnoma muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/TmIndividualCertificateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individual-certificates\/{individualCertificate}":{"get":{"tags":["TM Individual Certificates"],"summary":"Guvohnoma ma'lumotlarini ko'rish","description":"Bitta guvohnomaning to'liq ma'lumotlarini olish.","operationId":"c374c3ebb11bb8e41646e0040e2bbe9e","parameters":[{"name":"individualCertificate","in":"path","description":"Guvohnoma ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/TmIndividualCertificateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Guvohnoma topilmadi"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM Individual Certificates"],"summary":"Guvohnoma ma'lumotlarini yangilash","description":"Guvohnoma ma'lumotlarini qisman yoki to'liq yangilash. Fayllar multipart\/form-data orqali yuboriladi. PUT o'rniga POST + _method=PUT ishlatiladi.","operationId":"6878354477eb19afd6f99c5019db968d","parameters":[{"name":"individualCertificate","in":"path","description":"Guvohnoma ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"allOf":[{"$ref":"#\/components\/schemas\/TmIndividualCertificateStoreRequest"},{"properties":{"_method":{"description":"HTTP method override","type":"string","example":"PUT"}},"type":"object"}]}}}},"responses":{"200":{"description":"Guvohnoma yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/TmIndividualCertificateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Guvohnoma topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["TM Individual Certificates"],"summary":"Guvohnomani o'chirish","description":"Guvohnomani o'chirish (soft delete). Keyinchalik restore qilish mumkin.","operationId":"f08df506672b6a8072760ea85e5fd36b","parameters":[{"name":"individualCertificate","in":"path","description":"Guvohnoma ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Guvohnoma topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individual-certificates\/{id}\/restore":{"post":{"tags":["TM Individual Certificates"],"summary":"O'chirilgan guvohnomani tiklash","description":"Soft delete qilingan guvohnomani qayta tiklash.","operationId":"46ccbc2fa929804922e8a8a61757602a","parameters":[{"name":"id","in":"path","description":"Guvohnoma ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma tiklandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma muvaffaqiyatli tiklandi"},"data":{"$ref":"#\/components\/schemas\/TmIndividualCertificateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Guvohnoma topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individual-certificates\/{individualCertificate}\/toggle-status":{"patch":{"tags":["TM Individual Certificates"],"summary":"Guvohnoma holatini almashtirish (faol\/nofaol)","description":"Guvohnomaning faol holatini teskari qiymatga o'zgartirish.","operationId":"8897be559aaf954ae77bd09e5de7e58b","parameters":[{"name":"individualCertificate","in":"path","description":"Guvohnoma ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Holat o'zgartirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Guvohnoma holati faol qilindi"},"data":{"$ref":"#\/components\/schemas\/TmIndividualCertificateResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Guvohnoma topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individual-certificates\/verify\/{qrToken}":{"get":{"tags":["TM Individual Certificates"],"summary":"QR kod orqali guvohnomani tekshirish (ochiq)","description":"Ochiq API \u2014 autentifikatsiya kerak emas. QR skanerlanganda frontend shu API'ga murojaat qiladi.","operationId":"63bdb29124f60fa03c1ff714dbcd5041","parameters":[{"name":"qrToken","in":"path","description":"QR koddagi unique token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Guvohnoma ma'lumotlari"},"404":{"description":"Guvohnoma topilmadi"}}}},"\/api\/v1\/tm\/individual-certificates\/{individualCertificate}\/print":{"patch":{"tags":["TM Individual Certificates"],"summary":"Guvohnomani chop etish","description":"Guvohnomani chop etilgan deb belgilaydi. Faqat 1 marta chop etish mumkin. 72 soat ichida chop etilmasa avtomatik o'chiriladi.","operationId":"1a83568b5a3dcb0e9e9017f42e3446ef","parameters":[{"name":"individualCertificate","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Guvohnoma chop etildi"},"403":{"description":"Guvohnoma allaqachon chop etilgan"},"404":{"description":"Guvohnoma topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individuals":{"get":{"tags":["TM Individuals"],"summary":"Jismoniy shaxslar ro'yxati","description":"Barcha jismoniy shaxslar ro'yxatini olish. Qidiruv, filtrlash va sahifalash mumkin.","operationId":"1c3f06ec45a85bde41de125f4dde3918","parameters":[{"name":"search","in":"query","description":"FISH, JSHSHIR, pasport, telefon bo'yicha qidiruv","required":false,"schema":{"type":"string"}},{"name":"state_id","in":"query","description":"Viloyat ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","description":"Tuman ID bo'yicha filter","required":false,"schema":{"type":"integer"}},{"name":"is_active","in":"query","description":"Faol\/nofaol filter","required":false,"schema":{"type":"boolean"}},{"name":"is_foreign","in":"query","description":"Chetel fuqarosi filter","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Sahifadagi yozuvlar soni (-1 = hammasi)","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":-1}},{"name":"page","in":"query","description":"Sahifa raqami","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"Jismoniy shaxslar ro'yxati","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TmIndividualResponse"}},"meta":{"properties":{"total":{"type":"integer","example":50},"per_page":{"type":"integer","example":15},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":4},"from":{"type":"integer","example":1},"to":{"type":"integer","example":15}},"type":"object"},"links":{"properties":{"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM Individuals"],"summary":"Yangi jismoniy shaxs qo'shish","description":"Yangi jismoniy shaxs ma'lumotlarini kiritish.","operationId":"0510dd8e427d20412c0296b02f557d3a","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TmIndividualStoreRequest"}}}},"responses":{"201":{"description":"Jismoniy shaxs muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Jismoniy shaxs muvaffaqiyatli qo'shildi"},"data":{"$ref":"#\/components\/schemas\/TmIndividualResponse"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Validatsiya xatosi"},"errors":{"type":"object"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individuals\/find-by-passport":{"get":{"tags":["TM Individuals"],"summary":"Pasport yoki JSHSHIR bo'yicha jismoniy shaxsni qidirish","description":"Pasport seriyasi, to'liq pasport raqami yoki JSHSHIR bo'yicha jismoniy shaxsni topish.","operationId":"e7666e1f247c56e2715f0dc8ea0530cf","parameters":[{"name":"passport","in":"query","description":"Pasport seriyasi (masalan: AB), to'liq raqami (masalan: AB1234567) yoki JSHSHIR (masalan: 12345678901234)","required":true,"schema":{"type":"string","example":"AB1234567","maxLength":14,"minLength":2}}],"responses":{"200":{"description":"Topilgan jismoniy shaxslar","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"full_name":{"type":"string","example":"Valiyev Ali Karimovich"},"passport":{"type":"string","example":"AB1234567"},"jshshir":{"type":"string","example":"12345678901234"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individuals\/{individual}":{"get":{"tags":["TM Individuals"],"summary":"Jismoniy shaxs ma'lumotlarini ko'rish","description":"Bitta jismoniy shaxsning to'liq ma'lumotlarini olish.","operationId":"a7b4114b8bc6d3e44c1dc42af43086d9","parameters":[{"name":"individual","in":"path","description":"Jismoniy shaxs ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Jismoniy shaxs ma'lumotlari","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Muvaffaqiyatli"},"data":{"$ref":"#\/components\/schemas\/TmIndividualResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Jismoniy shaxs topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["TM Individuals"],"summary":"Jismoniy shaxs ma'lumotlarini yangilash","description":"Jismoniy shaxs ma'lumotlarini qisman yoki to'liq yangilash.","operationId":"8c6996dec63597d92efc05dcf631e5da","parameters":[{"name":"individual","in":"path","description":"Jismoniy shaxs ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TmIndividualStoreRequest"}}}},"responses":{"200":{"description":"Jismoniy shaxs yangilandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Jismoniy shaxs ma'lumotlari muvaffaqiyatli yangilandi"},"data":{"$ref":"#\/components\/schemas\/TmIndividualResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Jismoniy shaxs topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["TM Individuals"],"summary":"Jismoniy shaxsni o'chirish","description":"Jismoniy shaxsni o'chirish (soft delete). Keyinchalik restore qilish mumkin.","operationId":"5ddaef5995cafde2ac1f362f14517aca","parameters":[{"name":"individual","in":"path","description":"Jismoniy shaxs ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Jismoniy shaxs o'chirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Jismoniy shaxs muvaffaqiyatli o'chirildi"},"data":{"type":"string","example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Jismoniy shaxs topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individuals\/{id}\/restore":{"post":{"tags":["TM Individuals"],"summary":"O'chirilgan jismoniy shaxsni tiklash","description":"Soft delete qilingan jismoniy shaxsni qayta tiklash.","operationId":"5db828680f83106be861bbd3bf93e083","parameters":[{"name":"id","in":"path","description":"Jismoniy shaxs ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Jismoniy shaxs tiklandi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Jismoniy shaxs muvaffaqiyatli tiklandi"},"data":{"$ref":"#\/components\/schemas\/TmIndividualResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Jismoniy shaxs topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/individuals\/{individual}\/toggle-status":{"patch":{"tags":["TM Individuals"],"summary":"Jismoniy shaxs holatini almashtirish (faol\/nofaol)","description":"Jismoniy shaxsning faol holatini teskari qiymatga o'zgartirish.","operationId":"22a21a19135f58da0ac3f551537bcf3d","parameters":[{"name":"individual","in":"path","description":"Jismoniy shaxs ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Holat o'zgartirildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Jismoniy shaxs holati faol qilindi"},"data":{"$ref":"#\/components\/schemas\/TmIndividualResponse"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"Jismoniy shaxs topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students":{"get":{"tags":["TM Students"],"summary":"O'quvchilar ro'yxati","description":"Barcha o'quvchilar ro'yxatini olish. Qidiruv, filtrlash va sahifalash mumkin.","operationId":"154b5353114463db5eff8cdcff783cf9","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"tm_training_center_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"study_category","in":"query","required":false,"schema":{"type":"string","enum":["A","B","C","D","E","F"]}},{"name":"state_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"study_start_from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"study_start_to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"study_end_from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"study_end_to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"study_finished","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"study_class_category_ids[]","in":"query","description":"O'quv sinf kategoriyalari bo'yicha filter. Bir nechta ID yuborish mumkin.","required":false,"schema":{"type":"array","items":{"type":"integer"}},"example":[1,2]},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":15,"minimum":-1}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"O'quvchilar ro'yxati"},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["TM Students"],"summary":"Yangi o'quvchi qo'shish","operationId":"58397cb024e6e5ace9c46751d4c601c1","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["lastname","firstname"],"properties":{"lastname":{"type":"string","example":"Valiyev"},"firstname":{"type":"string","example":"Ali"},"middle_name":{"type":"string","nullable":true},"jshshir":{"type":"string","nullable":true,"maxLength":14},"stir":{"type":"string","nullable":true},"passport_series":{"type":"string","nullable":true,"maxLength":2},"passport_number":{"type":"string","nullable":true,"maxLength":7},"birth_date":{"type":"string","format":"date","nullable":true},"phone":{"type":"string","nullable":true},"state_id":{"type":"integer","nullable":true},"city_id":{"type":"integer","nullable":true},"address":{"type":"string","nullable":true},"tm_training_center_id":{"type":"integer","nullable":true},"study_class_category_ids":{"description":"O'quv sinf kategoriyalari ID lari","type":"array","items":{"type":"integer"},"nullable":true},"study_start_date":{"type":"string","format":"date","nullable":true},"study_end_date":{"type":"string","format":"date","nullable":true},"certificate_number":{"type":"string","nullable":true},"certificate_date":{"type":"string","format":"date","nullable":true},"medical_date":{"description":"Tibbiy ko'rik sanasi","type":"string","format":"date","nullable":true},"medical_number":{"description":"Tibbiy ko'rik raqami","type":"string","nullable":true},"medical_file":{"description":"Tibbiy ko'rik fayli (pdf, jpg, jpeg, png, max 5MB)","type":"string","format":"binary","nullable":true},"reference_file":{"type":"string","format":"binary","nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"O'quvchi muvaffaqiyatli yaratildi"},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}":{"get":{"tags":["TM Students"],"summary":"O'quvchi ma'lumotlarini ko'rish","operationId":"710ee0d05ace57b647f207fc4fb9f60b","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"O'quvchi ma'lumotlari"},"404":{"description":"O'quvchi topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["TM Students"],"summary":"O'quvchi ma'lumotlarini yangilash","operationId":"ab26bc725b248f82a2a6d0d5b378cbf5","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"properties":{"lastname":{"type":"string","nullable":true},"firstname":{"type":"string","nullable":true},"study_class_category_ids":{"description":"Yuborilsa \u2014 to'liq almashtiradi. Bo'sh array `[]` \u2014 barchasini o'chiradi.","type":"array","items":{"type":"integer"},"nullable":true},"reference_file":{"type":"string","format":"binary","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"O'quvchi yangilandi"},"404":{"description":"O'quvchi topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["TM Students"],"summary":"O'quvchini o'chirish","operationId":"05084c0705e06bed4720badb5a9b3879","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"O'quvchi o'chirildi"},"404":{"description":"O'quvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{id}\/restore":{"post":{"tags":["TM Students"],"summary":"O'chirilgan o'quvchini tiklash","operationId":"2c7ca45ff3db8af64ce5019b81748e31","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"O'quvchi tiklandi"},"404":{"description":"O'quvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/toggle-status":{"patch":{"tags":["TM Students"],"summary":"O'quvchi holatini almashtirish (faol\/nofaol)","operationId":"93a2a1397138d4f28270ebef9020aebd","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Holat o'zgartirildi"},"404":{"description":"O'quvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/statistics":{"get":{"tags":["TM Students"],"summary":"O'quvchilar statistikasi","operationId":"81137aa8f0c86411d34da79de51f73df","responses":{"200":{"description":"Statistika"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/upload-reference":{"post":{"tags":["TM Students"],"summary":"Malumotnoma faylini yuklash","operationId":"98e189ea0388323bff2f318545c25a74","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["reference_file"],"properties":{"reference_file":{"type":"string","format":"binary"}},"type":"object"}}}},"responses":{"200":{"description":"Fayl muvaffaqiyatli yuklandi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/delete-reference":{"delete":{"tags":["TM Students"],"summary":"Malumotnoma faylini o'chirish","operationId":"bf1e9951ecdddf025795aa9961e2721a","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Fayl o'chirildi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/reference-file":{"get":{"tags":["TM Students"],"summary":"Malumotnoma faylini yuklab olish","operationId":"4f71e2b9aed4d3f9ad7656fc366811a2","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Fayl"},"404":{"description":"Fayl topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/upload-certificate":{"post":{"tags":["TM Students - Sertifikat"],"summary":"Sertifikat ma'lumotlarini saqlash","operationId":"uploadStudentCertificate","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"properties":{"certificate_number":{"type":"string","nullable":true},"certificate_date":{"type":"string","format":"date","nullable":true},"certificate_file":{"type":"string","format":"binary","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Sertifikat saqlandi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/update-certificate":{"post":{"tags":["TM Students - Sertifikat"],"summary":"Sertifikat ma'lumotlarini tahrirlash","operationId":"updateStudentCertificate","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"properties":{"certificate_number":{"type":"string","nullable":true},"certificate_date":{"type":"string","format":"date","nullable":true},"certificate_file":{"type":"string","format":"binary","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Sertifikat yangilandi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/delete-certificate":{"delete":{"tags":["TM Students - Sertifikat"],"summary":"Sertifikat faylini o'chirish","operationId":"deleteStudentCertificate","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Sertifikat fayli o'chirildi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/certificate-file":{"get":{"tags":["TM Students - Sertifikat"],"summary":"Sertifikat PDF faylini yuklab olish","operationId":"serveStudentCertificate","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"PDF fayl"},"404":{"description":"Fayl topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/{student}\/exam-schedule":{"get":{"tags":["TM Students"],"summary":"O'quvchining imtihon jadvali (nazariy + amaliy)","operationId":"5c79b238cce5949b37e1ac182a47e87b","parameters":[{"name":"student","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Imtihon jadvali"},"404":{"description":"O'quvchi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/students\/check-certificate":{"get":{"tags":["TM Students"],"summary":"O'quvchining avvalgi guvohnomasini tekshirish","description":"Passport, STIR yoki JSHSHIR va toifa bo'yicha avvalgi guvohnoma mavjudligini tekshirish. O'quvchi qo'shishda toifa tanlaganda ishlatiladi.","operationId":"7ea7cef7f5d52ea3c68f94b0e0592250","parameters":[{"name":"passport","in":"query","description":"Passport seriya + raqam (masalan: AA1234567)","required":false,"schema":{"type":"string","maxLength":9}},{"name":"stir","in":"query","description":"STIR raqami","required":false,"schema":{"type":"string","maxLength":14}},{"name":"jshshir","in":"query","description":"JSHSHIR raqami","required":false,"schema":{"type":"string","maxLength":14}},{"name":"category","in":"query","description":"O'qish toifasi (A, B, C, D, E, F)","required":true,"schema":{"type":"string","enum":["A","B","C","D","E","F"]}}],"responses":{"200":{"description":"Tekshiruv natijasi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/training-centers":{"get":{"tags":["Training Centers"],"summary":"O'quv markazlari ro'yxati","operationId":"b2e1b0f93842ecb10be14f54bc763767","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"state_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"city_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":15}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1}},{"name":"sort_by","in":"query","description":"Saralash ustuni","schema":{"type":"string","default":"id"}},{"name":"sort_order","in":"query","description":"Saralash tartibi","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}],"responses":{"200":{"description":"O'quv markazlari ro'yxati"},"401":{"description":"Avtorizatsiyadan o'tilmagan"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Training Centers"],"summary":"Yangi o'quv markazi qo'shish (hodim bilan)","description":"O'quv markaz yaratilganda avtomatik hodim (user) ham yaratiladi. User login (email) va parol bilan tizimga kiradi, roli `tm-training-center`, hududi o'quv markaz hududi.","operationId":"c414e41d4c6df9e1f50382adae85df85","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","user_email","user_password"],"properties":{"name":{"description":"O'quv markazi nomi","type":"string","example":"Toshkent viloyati OSTK","maxLength":255},"stir":{"description":"Tashkilot STIR raqami","type":"string","example":"305831133","nullable":true,"maxLength":14},"fio":{"description":"Mas'ul shaxs F.I.O (Familiya Ism Otasining ismi)","type":"string","example":"Aliyev Vali Karimovich","maxLength":255},"mfo":{"description":"Bank MFO kodi (5 raqam)","type":"string","example":"00845","nullable":true,"maxLength":5,"minLength":5},"account_number":{"description":"Bank hisob raqami","type":"string","example":"20208000123456789012","nullable":true,"maxLength":50},"phone":{"description":"Telefon raqami","type":"string","example":"+998901234567","nullable":true,"maxLength":20},"state_id":{"description":"Viloyat ID (tbl_states)","type":"integer","example":27,"nullable":true},"city_id":{"description":"Tuman\/Shahar ID (tbl_cities)","type":"integer","example":2701,"nullable":true},"address":{"description":"To'liq manzil","type":"string","example":"Bektemir tumani, Agro ko'chasi, 1-uy","nullable":true,"maxLength":1000},"user_email":{"description":"Tizimga kirish logini (unique)","type":"string","example":"toshkent_ostk","maxLength":255},"user_password":{"description":"Tizimga kirish paroli (kamida 6 belgi)","type":"string","format":"password","example":"parol123","minLength":6}},"type":"object"}}}},"responses":{"201":{"description":"O'quv markazi va hodim muvaffaqiyatli yaratildi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"O'quv markazi va hodim muvaffaqiyatli yaratildi"},"data":{"$ref":"#\/components\/schemas\/TrainingCenterResource"}},"type":"object"}}}},"401":{"description":"Avtorizatsiyadan o'tilmagan","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}},"type":"object"}}}},"422":{"description":"Validatsiya xatosi","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/training-centers\/{trainingCenter}":{"get":{"tags":["Training Centers"],"summary":"O'quv markazi ma'lumotlari","operationId":"b82c804703e2a6a281492a57a9aa16c9","parameters":[{"name":"trainingCenter","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"O'quv markazi ma'lumotlari"},"404":{"description":"O'quv markazi topilmadi"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Training Centers"],"summary":"O'quv markazi ma'lumotlarini yangilash","operationId":"70792113cd75270b5590ec579b9bbbd5","parameters":[{"name":"trainingCenter","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"description":"O'quv markazi nomi","type":"string","example":"Toshkent avtomaktab","maxLength":255},"stir":{"description":"STIR (faqat raqamlar)","type":"string","example":"12345678901234","nullable":true,"maxLength":14},"fio":{"description":"Mas'ul shaxs FIO","type":"string","example":"Aliyev Vali Karimovich","nullable":true,"maxLength":255},"mfo":{"description":"MFO (5 ta raqam)","type":"string","example":"00845","nullable":true,"maxLength":5,"minLength":5},"account_number":{"description":"Xisob raqami (faqat raqamlar)","type":"string","example":"20208000123456789012","nullable":true,"maxLength":20},"phone":{"description":"Telefon raqami","type":"string","example":"+998901234567","nullable":true,"maxLength":20},"state_id":{"description":"Viloyat ID","type":"integer","example":1,"nullable":true},"city_id":{"description":"Tuman\/Shahar ID","type":"integer","example":10,"nullable":true},"address":{"description":"Manzil","type":"string","example":"Toshkent sh., Chilonzor tumani, Bunyodkor ko'chasi 1","nullable":true,"maxLength":1000},"is_active":{"description":"Faollik holati","type":"boolean","example":true,"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"O'quv markazi yangilandi"},"401":{"description":"Avtorizatsiyadan o'tilmagan"},"404":{"description":"O'quv markazi topilmadi"},"422":{"description":"Validatsiya xatosi"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Training Centers"],"summary":"O'quv markazini o'chirish","operationId":"8097a7b90f21be3dcb7505a68359b6fd","parameters":[{"name":"trainingCenter","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"O'quv markazi o'chirildi"},"404":{"description":"O'quv markazi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/training-centers\/{id}\/restore":{"post":{"tags":["Training Centers"],"summary":"O'chirilgan o'quv markazini tiklash","operationId":"9b28d140ce3f9700790cd6305e7b958f","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"O'quv markazi tiklandi"},"404":{"description":"O'quv markazi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/training-centers\/{trainingCenter}\/toggle-status":{"patch":{"tags":["Training Centers"],"summary":"O'quv markazi holatini almashtirish","operationId":"874cdd371f1edd11981c0bef31d45ba9","parameters":[{"name":"trainingCenter","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Holat o'zgartirildi"},"404":{"description":"O'quv markazi topilmadi"}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/tm\/training-centers\/statistics":{"get":{"tags":["Training Centers"],"summary":"O'quv markazlari statistikasi","operationId":"d1b4242ccb107617f899607255a19262","responses":{"200":{"description":"Statistika"}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"WeeklyExamDay":{"properties":{"day":{"type":"string","example":"Dushanba"},"day_number":{"type":"integer","example":1},"theory":{"type":"integer","example":5},"practical":{"type":"integer","example":2}},"type":"object"},"TopTrainingCenter":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Agro o'quv markazi"},"students_count":{"type":"integer","example":120}},"type":"object"},"ExamResultByRegion":{"properties":{"region_id":{"type":"integer","example":1},"region_name":{"type":"string","example":"Toshkent shahri"},"theory_passed":{"type":"integer","example":45},"theory_failed":{"type":"integer","example":12},"practical_passed":{"type":"integer","example":30},"practical_failed":{"type":"integer","example":8}},"type":"object"},"MonthlyCertificateItem":{"properties":{"month":{"type":"integer","example":1},"month_name":{"type":"string","example":"Yanvar"},"new_format":{"type":"integer","example":25},"old_format":{"type":"integer","example":10},"total":{"type":"integer","example":35}},"type":"object"},"MonthlyCertificatesResponse":{"properties":{"year":{"type":"integer","example":2026},"total_new_format":{"type":"integer","example":280},"total_old_format":{"type":"integer","example":60},"total":{"type":"integer","example":340},"months":{"type":"array","items":{"$ref":"#\/components\/schemas\/MonthlyCertificateItem"}}},"type":"object"},"DashboardResponse":{"properties":{"total_students":{"type":"integer","example":1250},"theory_exam_in_progress":{"type":"integer","example":12},"practical_exam_in_progress":{"type":"integer","example":5},"total_individuals":{"type":"integer","example":340},"certificates":{"properties":{"new_format":{"type":"integer","example":280},"old_format":{"type":"integer","example":60}},"type":"object"},"total_training_centers":{"type":"integer","example":45},"direct_exam_takers":{"type":"integer","example":23},"weekly_exams":{"type":"array","items":{"$ref":"#\/components\/schemas\/WeeklyExamDay"}},"top_training_centers":{"type":"array","items":{"$ref":"#\/components\/schemas\/TopTrainingCenter"}},"exam_results_by_region":{"type":"array","items":{"$ref":"#\/components\/schemas\/ExamResultByRegion"}}},"type":"object"},"InstructionResponse":{"properties":{"id":{"type":"integer","example":1},"title":{"type":"string","example":"Traktor haydash bo'yicha yo'riqnoma"},"level":{"type":"string","example":"republic"},"level_label":{"type":"string","example":"Respublika"},"file_url":{"type":"string","example":"https:\/\/gateway-agrosert.simplex.uz\/api\/v1\/tm\/files\/tm\/instructions\/abc.pdf"},"is_active":{"type":"boolean","example":true},"created_by":{"type":"integer","example":1,"nullable":true},"created_at":{"type":"string","example":"2026-03-12 12:00:00"},"updated_at":{"type":"string","example":"2026-03-12 12:00:00"}},"type":"object"},"InstructionStoreRequest":{"required":["title","level","file"],"properties":{"title":{"description":"Sarlavha","type":"string","example":"Yo'riqnoma nomi","maxLength":500},"level":{"description":"Daraja","type":"string","enum":["republic","region","district","training_center"]},"file":{"description":"PDF fayl (max 10MB)","type":"string","format":"binary"}},"type":"object"},"PracticalExamSheetResponse":{"properties":{"id":{"type":"integer","example":1},"commission_members":{"type":"array","items":{"properties":{"full_name":{"type":"string","example":"Karimov Anvar Baxtiyorovich"},"workplace_name":{"type":"string","example":"Agro Texnika MChJ"},"passport":{"type":"string","example":"AB1234567"},"phone":{"type":"string","example":"+998901234567"}},"type":"object"}},"practical_exam_date":{"type":"string","format":"date","example":"2026-03-01"},"practical_exam_number":{"type":"string","example":"AI-2026\/001"},"medical_exam_date":{"type":"string","format":"date","example":"2026-02-25"},"medical_exam_number":{"type":"string","example":"TK-2026\/001"},"document_file":{"type":"string","example":"https:\/\/gateway-agrosert.simplex.uz\/api\/v1\/tm\/files\/tm\/exam-sheets\/documents\/abc.pdf","nullable":true},"road_rules_result":{"type":"boolean","example":true},"technical_safety_result":{"type":"boolean","example":true},"driving_skills_result":{"type":"boolean","example":false},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","example":"2026-02-22 12:00:00"},"updated_at":{"type":"string","example":"2026-02-22 12:00:00"}},"type":"object"},"PracticalExamSheetStoreRequest":{"required":["commission_members","practical_exam_date","practical_exam_number","medical_exam_date","medical_exam_number","road_rules_result","technical_safety_result","driving_skills_result"],"properties":{"commission_members":{"description":"JSON massiv: 3 ta a'zo [{full_name, workplace_name, passport, phone}, ...]","type":"string","example":"[{\"full_name\":\"Karimov A.B.\",\"workplace_name\":\"Agro MChJ\",\"passport\":\"AB1234567\",\"phone\":\"+998901234567\"},{\"full_name\":\"Valiyev S.T.\",\"workplace_name\":\"Texnika MChJ\",\"passport\":\"CD7654321\",\"phone\":\"+998901234568\"},{\"full_name\":\"Rahimov N.K.\",\"workplace_name\":\"Servis MChJ\",\"passport\":\"EF1122334\",\"phone\":\"+998901234569\"}]"},"practical_exam_date":{"description":"Amaliy imtihon sanasi","type":"string","format":"date","example":"2026-03-01"},"practical_exam_number":{"description":"Amaliy imtihon raqami","type":"string","example":"AI-2026\/001","maxLength":50},"medical_exam_date":{"description":"Tibbiy ko'rik sanasi","type":"string","format":"date","example":"2026-02-25"},"medical_exam_number":{"description":"Tibbiy ko'rik raqami","type":"string","example":"TK-2026\/001","maxLength":50},"document_file":{"description":"Hujjat fayli (pdf, jpg, jpeg, png, max 5MB)","type":"string","format":"binary"},"road_rules_result":{"description":"Yo'l harakati qoidasi natijasi","type":"boolean","example":true},"technical_safety_result":{"description":"Texnika xavfsizligi natijasi","type":"boolean","example":true},"driving_skills_result":{"description":"Texnika boshqarish ko'nikmasi natijasi","type":"boolean","example":false}},"type":"object"},"PracticalInvoiceResponse":{"properties":{"id":{"type":"integer","example":1},"tm_student_id":{"type":"integer","example":1},"tm_practical_invoice_type_id":{"type":"integer","example":1},"invoice_number":{"type":"string","example":"PINV-2026-001"},"invoice_date":{"type":"string","format":"date","example":"2026-02-21"},"is_active":{"type":"boolean","example":true},"student":{"properties":{"id":{"type":"integer","example":1},"full_name":{"type":"string","example":"Valiyev Ali Karimovich"}},"type":"object","nullable":true},"invoice_type":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Amaliy imtihon topshirish uchun"},"amount":{"type":"integer","example":5000000}},"type":"object","nullable":true},"created_at":{"type":"string","example":"2026-02-21 12:00:00"},"updated_at":{"type":"string","example":"2026-02-21 12:00:00"}},"type":"object"},"PracticalInvoiceStoreRequest":{"required":["tm_student_id","tm_practical_invoice_type_id","invoice_date"],"properties":{"tm_student_id":{"description":"O'quvchi ID (tm_students jadvalidan)","type":"integer","example":1},"tm_practical_invoice_type_id":{"description":"To'lov turi ID (tm_practical_invoice_types jadvalidan)","type":"integer","example":1},"invoice_number":{"description":"Invoice raqami (bo'sh qoldirilsa avtomatik generatsiya qilinadi)","type":"string","example":"PINV-2026-001","nullable":true,"maxLength":255},"invoice_date":{"description":"Invoice sanasi","type":"string","format":"date","example":"2026-02-21"}},"type":"object"},"PracticalInvoiceStatistics":{"properties":{"total_invoices":{"type":"integer","example":50},"active_invoices":{"type":"integer","example":45},"by_type":{"type":"array","items":{"properties":{"invoice_type_id":{"type":"integer","example":1},"invoice_type_name":{"type":"string","example":"Amaliy imtihon topshirish uchun"},"count":{"type":"integer","example":30}},"type":"object"}}},"type":"object"},"PracticalInvoiceTypeResponse":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Amaliy imtihon topshirish uchun"},"amount":{"description":"Summa (tiyin)","type":"integer","example":5000000},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","example":"2026-02-21 12:00:00"},"updated_at":{"type":"string","example":"2026-02-21 12:00:00"}},"type":"object"},"PracticalInvoiceTypeStoreRequest":{"required":["name","amount"],"properties":{"name":{"description":"To'lov turi nomi","type":"string","example":"Amaliy imtihon topshirish uchun","maxLength":255},"amount":{"description":"Summa (tiyin)","type":"integer","example":5000000,"minimum":0}},"type":"object"},"CertificateReportRow":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent shahri"},"total_certificates_count":{"type":"integer","example":50},"total_paid_amount":{"type":"integer","example":5000000},"new_format_count":{"type":"integer","example":30},"new_format_amount":{"type":"integer","example":3000000},"old_format_count":{"type":"integer","example":20},"old_format_amount":{"type":"integer","example":2000000}},"type":"object"},"CertificateReportResponse":{"properties":{"level":{"type":"string","example":"republic","enum":["republic","region","district"]},"group_by":{"type":"string","example":"regions","enum":["regions","districts","training_centers"]},"rows":{"type":"array","items":{"$ref":"#\/components\/schemas\/CertificateReportRow"}},"totals":{"properties":{"total_certificates_count":{"type":"integer"},"total_paid_amount":{"type":"integer"},"new_format_count":{"type":"integer"},"new_format_amount":{"type":"integer"},"old_format_count":{"type":"integer"},"old_format_amount":{"type":"integer"}},"type":"object"}},"type":"object"},"TheoryExamReportRow":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent shahri"},"created_invoices_count":{"type":"integer","example":50},"created_invoices_amount":{"type":"integer","example":5000000},"paid_invoices_count":{"type":"integer","example":30},"paid_invoices_amount":{"type":"integer","example":3000000},"unpaid_invoices_count":{"type":"integer","example":15},"unpaid_invoices_amount":{"type":"integer","example":1500000},"eligible_students_count":{"type":"integer","example":40},"exam_taken_count":{"type":"integer","example":35},"passed_count":{"type":"integer","example":25},"failed_count":{"type":"integer","example":10},"not_taken_count":{"type":"integer","example":5},"cancelled_invoices_students_count":{"type":"integer","example":5}},"type":"object"},"TheoryExamReportResponse":{"properties":{"level":{"type":"string","example":"republic","enum":["republic","region","district","training_center"]},"group_by":{"type":"string","example":"regions","enum":["regions","districts","training_centers","users"]},"rows":{"type":"array","items":{"$ref":"#\/components\/schemas\/TheoryExamReportRow"}},"totals":{"properties":{"created_invoices_count":{"type":"integer"},"created_invoices_amount":{"type":"integer"},"paid_invoices_count":{"type":"integer"},"paid_invoices_amount":{"type":"integer"},"unpaid_invoices_count":{"type":"integer"},"unpaid_invoices_amount":{"type":"integer"},"eligible_students_count":{"type":"integer"},"exam_taken_count":{"type":"integer"},"passed_count":{"type":"integer"},"failed_count":{"type":"integer"},"not_taken_count":{"type":"integer"},"cancelled_invoices_students_count":{"type":"integer"}},"type":"object"}},"type":"object"},"ReportRowWithTrainingCenters":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent shahri"},"training_centers_count":{"type":"integer","example":5},"students_count":{"type":"integer","example":120},"approved_count":{"type":"integer","example":80},"not_approved_count":{"type":"integer","example":40},"studying_count":{"type":"integer","example":30},"finished_count":{"type":"integer","example":90}},"type":"object"},"ReportRow":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent agro o'quv markazi"},"students_count":{"type":"integer","example":50},"approved_count":{"type":"integer","example":30},"not_approved_count":{"type":"integer","example":20},"studying_count":{"type":"integer","example":10},"finished_count":{"type":"integer","example":40}},"type":"object"},"StudentReportResponse":{"properties":{"level":{"description":"Hisobot darajasi","type":"string","example":"republic","enum":["republic","region","district","training_center"]},"group_by":{"description":"Guruhlanish turi","type":"string","example":"regions","enum":["regions","districts","training_centers","users"]},"rows":{"description":"Hisobot qatorlari","type":"array","items":{"$ref":"#\/components\/schemas\/ReportRowWithTrainingCenters"}},"totals":{"description":"Jami ko'rsatkichlar","properties":{"training_centers_count":{"type":"integer","example":15},"students_count":{"type":"integer","example":500},"approved_count":{"type":"integer","example":300},"not_approved_count":{"type":"integer","example":200},"studying_count":{"type":"integer","example":100},"finished_count":{"type":"integer","example":400}},"type":"object"}},"type":"object"},"TheoryInvoiceResponse":{"properties":{"id":{"type":"integer","example":1},"tm_student_id":{"type":"integer","example":1},"tm_theory_invoice_type_id":{"type":"integer","example":1},"invoice_number":{"type":"string","example":"INV-2026-001"},"invoice_date":{"type":"string","format":"date","example":"2026-02-19"},"is_active":{"type":"boolean","example":true},"student":{"properties":{"id":{"type":"integer","example":1},"full_name":{"type":"string","example":"Valiyev Ali Karimovich"}},"type":"object","nullable":true},"invoice_type":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Nazariy imtihon topshirish uchun"},"amount":{"type":"integer","example":5000000}},"type":"object","nullable":true},"created_at":{"type":"string","example":"2026-02-19 12:00:00"},"updated_at":{"type":"string","example":"2026-02-19 12:00:00"}},"type":"object"},"TheoryInvoiceStoreRequest":{"required":["tm_student_id","tm_theory_invoice_type_id","invoice_date"],"properties":{"tm_student_id":{"description":"O'quvchi ID (tm_students jadvalidan)","type":"integer","example":1},"tm_theory_invoice_type_id":{"description":"To'lov turi ID (tm_theory_invoice_types jadvalidan)","type":"integer","example":1},"invoice_number":{"description":"Invoice raqami (bo'sh qoldirilsa avtomatik generatsiya qilinadi)","type":"string","example":"INV-2026-001","nullable":true,"maxLength":255},"invoice_date":{"description":"Invoice sanasi","type":"string","format":"date","example":"2026-02-19"}},"type":"object"},"TheoryInvoiceStatistics":{"properties":{"total_invoices":{"type":"integer","example":50},"active_invoices":{"type":"integer","example":45},"by_type":{"type":"array","items":{"properties":{"invoice_type_id":{"type":"integer","example":1},"invoice_type_name":{"type":"string","example":"Nazariy imtihon topshirish uchun"},"count":{"type":"integer","example":30}},"type":"object"}}},"type":"object"},"TheoryInvoiceTypeResponse":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Nazariy imtihon topshirish uchun"},"amount":{"description":"Summa (tiyin)","type":"integer","example":5000000},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","example":"2026-02-19 12:00:00"},"updated_at":{"type":"string","example":"2026-02-19 12:00:00"}},"type":"object"},"TheoryInvoiceTypeStoreRequest":{"required":["name","amount"],"properties":{"name":{"description":"To'lov turi nomi","type":"string","example":"Nazariy imtihon topshirish uchun","maxLength":255},"amount":{"description":"Summa (tiyin)","type":"integer","example":5000000,"minimum":0}},"type":"object"},"TmCandidateResponse":{"properties":{"id":{"type":"integer","example":1},"full_name":{"type":"string","example":"Karimov Jamshid Botirovich"},"passport":{"type":"string","example":"AB7654321"},"birth_date":{"type":"string","format":"date","example":"1997-04-12"},"jshshir":{"type":"string","example":"40412199700001"},"phone":{"type":"string","example":"+998901112233"},"region":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent shahri"}},"type":"object","nullable":true},"district":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Yunusobod tumani"}},"type":"object","nullable":true},"address":{"type":"string","example":"Toshkent shahri, Yunusobod tumani","nullable":true}},"type":"object"},"TmCandidateStoreRequest":{"required":["lastname","firstname"],"properties":{"lastname":{"description":"Familiya","type":"string","example":"Karimov","maxLength":255},"firstname":{"description":"Ism","type":"string","example":"Jamshid","maxLength":255},"middle_name":{"description":"Otasining ismi","type":"string","example":"Botirovich","nullable":true,"maxLength":255},"passport":{"description":"Pasport (seriya + raqam)","type":"string","example":"AB7654321","nullable":true,"maxLength":9},"birth_date":{"description":"Tug'ilgan sana","type":"string","format":"date","example":"1997-04-12","nullable":true},"jshshir":{"description":"JSHSHIR (14 ta raqam)","type":"string","example":"40412199700001","nullable":true,"maxLength":14},"phone":{"description":"Telefon raqam","type":"string","example":"+998901112233","nullable":true,"maxLength":20},"state_id":{"description":"Viloyat ID","type":"integer","example":1,"nullable":true},"city_id":{"description":"Tuman ID","type":"integer","example":1,"nullable":true},"address":{"description":"Manzil","type":"string","example":"Toshkent shahri, Yunusobod tumani","nullable":true,"maxLength":500}},"type":"object"},"TmCertificateBasisResponse":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Traktorchi-mashinist guvohnomasini berish"},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","example":"2026-02-23 12:00:00"},"updated_at":{"type":"string","example":"2026-02-23 12:00:00"}},"type":"object"},"TmCertificateBasisStoreRequest":{"required":["name"],"properties":{"name":{"description":"Guvohnoma asosi nomi","type":"string","example":"Traktorchi-mashinist guvohnomasini berish","maxLength":500},"is_active":{"description":"Faol holati","type":"boolean","example":true}},"type":"object"},"TmIndividualCertificateResponse":{"properties":{"id":{"type":"integer","example":1},"certificate_number":{"type":"string","example":"UZ-AA0150157","nullable":true},"individual":{"properties":{"id":{"type":"integer","example":1},"full_name":{"type":"string","example":"Valiyev Ali Karimovich"},"jshshir":{"type":"string","example":"12345678901234"},"passport":{"type":"string","example":"AB1234567"}},"type":"object"},"certificate_basis":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Traktorchi mashinistga klass berish"}},"type":"object"},"basis_document_info":{"type":"string","example":"Asos hujjat ma'lumotlari","nullable":true},"special_marks":{"type":"string","example":"Alohida belgilar","nullable":true},"category_a":{"properties":{"issue_date":{"type":"string","format":"date","example":"2026-01-15","nullable":true},"expiry_years":{"type":"integer","example":5,"nullable":true}},"type":"object"},"category_b":{"properties":{"issue_date":{"type":"string","format":"date","nullable":true},"expiry_years":{"type":"integer","nullable":true}},"type":"object"},"category_c":{"properties":{"issue_date":{"type":"string","format":"date","nullable":true},"expiry_years":{"type":"integer","nullable":true}},"type":"object"},"category_d":{"properties":{"issue_date":{"type":"string","format":"date","nullable":true},"expiry_years":{"type":"integer","nullable":true}},"type":"object"},"category_e":{"properties":{"issue_date":{"type":"string","format":"date","nullable":true},"expiry_years":{"type":"integer","nullable":true}},"type":"object"},"category_f":{"properties":{"issue_date":{"type":"string","format":"date","nullable":true},"expiry_years":{"type":"integer","nullable":true}},"type":"object"},"photo":{"type":"string","nullable":true},"signature":{"type":"string","nullable":true},"old_certificate_file":{"type":"string","nullable":true},"medical_certificate_file":{"type":"string","nullable":true},"is_paid":{"type":"boolean","example":false},"payment_status":{"type":"string","example":"unpaid"},"status":{"type":"string","example":"pending"},"is_active":{"type":"boolean","example":true},"is_new_format":{"type":"boolean","example":true},"created_by":{"type":"integer","example":1,"nullable":true},"created_at":{"type":"string","example":"2026-02-23 12:00:00"},"updated_at":{"type":"string","example":"2026-02-23 12:00:00"}},"type":"object"},"TmIndividualCertificateStoreRequest":{"required":["tm_individual_id","tm_certificate_basis_id"],"properties":{"tm_individual_id":{"description":"Jismoniy shaxs ID","type":"integer","example":1},"tm_certificate_basis_id":{"description":"Guvohnoma asosi ID","type":"integer","example":1},"basis_document_info":{"description":"Asos hujjat ma'lumotlari","type":"string","example":"Asos hujjat ma'lumotlari"},"special_marks":{"description":"Alohida belgilar","type":"string","example":"Alohida belgilar"},"category_a_issue_date":{"description":"A toifa berilgan sana","type":"string","format":"date","example":"2026-01-15"},"category_a_expiry_years":{"description":"A toifa muddat (yil)","type":"integer","example":5},"category_b_issue_date":{"description":"B toifa berilgan sana","type":"string","format":"date"},"category_b_expiry_years":{"description":"B toifa muddat (yil)","type":"integer"},"category_c_issue_date":{"description":"C toifa berilgan sana","type":"string","format":"date"},"category_c_expiry_years":{"description":"C toifa muddat (yil)","type":"integer"},"category_d_issue_date":{"description":"D toifa berilgan sana","type":"string","format":"date"},"category_d_expiry_years":{"description":"D toifa muddat (yil)","type":"integer"},"category_e_issue_date":{"description":"E toifa berilgan sana","type":"string","format":"date"},"category_e_expiry_years":{"description":"E toifa muddat (yil)","type":"integer"},"category_f_issue_date":{"description":"F toifa berilgan sana","type":"string","format":"date"},"category_f_expiry_years":{"description":"F toifa muddat (yil)","type":"integer"},"photo":{"description":"Rasm (jpg, jpeg, png, max 2MB)","type":"string","format":"binary"},"signature":{"description":"Imzo rasimi (jpg, jpeg, png, max 2MB)","type":"string","format":"binary"},"old_certificate_file":{"description":"Eski guvohnoma\/diplom nusxasi (pdf, jpg, jpeg, png, max 10MB)","type":"string","format":"binary"},"medical_certificate_file":{"description":"Tibbiy ma'lumotnoma (pdf, jpg, jpeg, png, max 10MB)","type":"string","format":"binary"},"is_paid":{"description":"To'langan","type":"boolean","example":false},"is_new_format":{"description":"Yangi namunadagi guvohnoma (seriya raqam avtomatik beriladi)","type":"boolean","example":true}},"type":"object"},"TmIndividualResponse":{"properties":{"id":{"type":"integer","example":1},"first_name":{"type":"string","example":"Ali"},"last_name":{"type":"string","example":"Valiyev"},"middle_name":{"type":"string","example":"Karimovich","nullable":true},"full_name":{"type":"string","example":"Valiyev Ali Karimovich"},"passport":{"type":"string","example":"AB1234567"},"jshshir":{"type":"string","example":"12345678901234"},"birth_date":{"type":"string","format":"date","example":"1995-05-15"},"is_foreign":{"type":"boolean","example":false},"country":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"O'zbekiston"}},"type":"object","nullable":true},"birth_state":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent shahri"}},"type":"object","nullable":true},"birth_city":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Yunusobod tumani"}},"type":"object","nullable":true},"passport_state":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent shahri"}},"type":"object","nullable":true},"passport_city":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Yunusobod tumani"}},"type":"object","nullable":true},"passport_given_date":{"type":"string","format":"date","example":"2020-01-15","nullable":true},"state":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent shahri"}},"type":"object","nullable":true},"city":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Yunusobod tumani"}},"type":"object","nullable":true},"address":{"type":"string","example":"Toshkent shahri, Yunusobod tumani","nullable":true},"phone":{"type":"string","example":"+998901234567"},"is_active":{"type":"boolean","example":true},"created_by":{"type":"integer","example":1,"nullable":true},"created_at":{"type":"string","example":"2026-02-23 12:00:00"},"updated_at":{"type":"string","example":"2026-02-23 12:00:00"}},"type":"object"},"TmIndividualStoreRequest":{"required":["first_name","last_name","passport","jshshir","birth_date","phone"],"properties":{"first_name":{"description":"Ism","type":"string","example":"Ali","maxLength":100},"last_name":{"description":"Familiya","type":"string","example":"Valiyev","maxLength":100},"middle_name":{"description":"Otasining ismi","type":"string","example":"Karimovich","maxLength":100},"passport":{"description":"Pasport (2 ta katta harf + 7 ta raqam)","type":"string","example":"AB1234567","maxLength":9},"jshshir":{"description":"JSHSHIR (14 ta raqam)","type":"string","example":"12345678901234","maxLength":14},"birth_date":{"description":"Tug'ilgan sana","type":"string","format":"date","example":"1995-05-15"},"is_foreign":{"description":"Chetel fuqarosimi","type":"boolean","example":false},"country_id":{"description":"Tug'ilgan davlat ID","type":"integer","example":1},"birth_state_id":{"description":"Tug'ilgan viloyat ID","type":"integer","example":1},"birth_city_id":{"description":"Tug'ilgan tuman ID","type":"integer","example":1},"passport_state_id":{"description":"Pasport berilgan viloyat ID","type":"integer","example":1},"passport_city_id":{"description":"Pasport berilgan tuman ID","type":"integer","example":1},"passport_given_date":{"description":"Pasport berilgan sana","type":"string","format":"date","example":"2020-01-15"},"state_id":{"description":"Yashash viloyati ID","type":"integer","example":1},"city_id":{"description":"Yashash tumani ID","type":"integer","example":1},"address":{"description":"Manzil","type":"string","example":"Toshkent shahri, Yunusobod tumani"},"phone":{"description":"Telefon raqam","type":"string","example":"+998901234567"}},"type":"object"},"TmStudentResponse":{"properties":{"id":{"type":"integer","example":1},"tm_training_center":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"O'quv markazi nomi"}},"type":"object"},"jshshir":{"type":"string","example":"12345678901234"},"passport":{"type":"string","example":"AB1212345"},"lastname":{"type":"string","example":"Valiyev"},"firstname":{"type":"string","example":"Ali"},"middle_name":{"type":"string","example":"Karimovich"},"full_name":{"type":"string","example":"Valiyev Ali Karimovich"},"birth_date":{"type":"string","format":"date","example":"1995-05-15"},"phone":{"type":"string","example":"+998901234567"},"region":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent shahri"}},"type":"object","nullable":true},"district":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Yunusobod tumani"}},"type":"object","nullable":true},"address":{"type":"string","example":"Toshkent shahri, Yunusobod tumani"},"study_class_categories":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Traktor haydovchilari"},"is_active":{"type":"boolean","example":true}},"type":"object"}},"certificate_date":{"type":"string","format":"date","example":"2026-03-01"},"certificate_number":{"type":"string","example":"TM-001234"},"certificate_file":{"type":"string","nullable":true},"total_study_hours":{"type":"integer","example":120},"weekly_study_hours":{"type":"integer","example":20},"study_start_date":{"type":"string","format":"date","example":"2026-01-15"},"study_end_date":{"type":"string","format":"date","example":"2026-03-15"},"workplace_stir":{"type":"string","example":"987654321"},"workplace_name":{"type":"string","example":"Agro Texnika MChJ"},"workplace_phone":{"type":"string","example":"+998712345678"},"work_qualification":{"type":"string","example":"Traktorchi-mashinist"},"reference_date":{"type":"string","format":"date","example":"2026-01-10"},"reference_number":{"type":"string","example":"ML-2026\/001"},"reference_file":{"type":"string","nullable":true},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","example":"2026-02-13 12:00:00"},"updated_at":{"type":"string","example":"2026-02-13 12:00:00"}},"type":"object"},"CommissionMemberResource":{"title":"Commission Member","description":"Komissiya a'zosi","properties":{"id":{"type":"integer","example":1},"full_name":{"type":"string","example":"Karimov Anvar Baxtiyorovich"},"workplace_name":{"type":"string","example":"Agro Texnika MChJ","nullable":true},"passport":{"type":"string","example":"AB1234567","nullable":true},"phone":{"type":"string","example":"+998901234567","nullable":true},"state_id":{"type":"integer","example":27,"nullable":true},"region":{"type":"object","nullable":true},"city_id":{"type":"integer","example":2701,"nullable":true},"district":{"type":"object","nullable":true},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"TestQuestion":{"title":"Test Question","description":"Test savoli resursi (multilingual + transliteratsiya)","properties":{"id":{"type":"integer","example":1},"subject":{"type":"string","example":"yhq","enum":["yhq","ekspluatatsiya","general"]},"subject_label":{"type":"string","example":"Yo'l harakati qoidalari testi"},"study_category":{"type":"string","example":null,"nullable":true,"enum":["A","B","C","D","E","F"]},"study_category_label":{"type":"string","example":null,"nullable":true},"question_text":{"type":"string","example":"Qizil chiroqda nima qilish kerak?"},"question_text_ru":{"type":"string","example":"\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0441\u0432\u0435\u0442?","nullable":true},"question_text_en":{"type":"string","example":"What to do on red light?","nullable":true},"question_text_cyrillic":{"type":"string","example":"\u049a\u0438\u0437\u0438\u043b \u0447\u0438\u0440\u043e\u049b\u0434\u0430 \u043d\u0438\u043c\u0430 \u049b\u0438\u043b\u0438\u0448 \u043a\u0435\u0440\u0430\u043a?","nullable":true},"question_image":{"type":"string","example":null,"nullable":true},"answer_a":{"type":"string","example":"To'xtash kerak"},"answer_a_ru":{"type":"string","nullable":true},"answer_a_en":{"type":"string","nullable":true},"answer_b":{"type":"string","example":"Davom etish kerak"},"answer_b_ru":{"type":"string","nullable":true},"answer_b_en":{"type":"string","nullable":true},"answer_c":{"type":"string","example":"Tezlikni oshirish kerak"},"answer_c_ru":{"type":"string","nullable":true},"answer_c_en":{"type":"string","nullable":true},"correct_answer":{"type":"string","example":"a","enum":["a","b","c"]},"study_class_categories":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Traktor haydovchilari"},"is_active":{"type":"boolean","example":true}},"type":"object"},"nullable":true},"is_active":{"type":"boolean","example":true},"created_by":{"type":"integer","example":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"TheoryExam":{"title":"Theory Exam","description":"Nazariy imtihon resursi","properties":{"id":{"type":"integer","example":1},"student_id":{"type":"integer","example":1},"student":{"properties":{"id":{"type":"integer","example":1},"full_name":{"type":"string","example":"Valiyev Ali Karimovich"},"jshshir":{"type":"string","example":"12345678901234"}},"type":"object","nullable":true},"attempt_number":{"type":"integer","example":1,"nullable":true},"subject":{"type":"string","example":"yhq","nullable":true,"enum":["yhq","ekspluatatsiya"]},"subject_label":{"type":"string","example":"Yo'l harakati qoidalari testi","nullable":true},"total_questions":{"type":"integer","example":15,"nullable":true},"correct_answers":{"type":"integer","example":12,"nullable":true},"wrong_answers":{"type":"integer","example":2,"nullable":true},"unanswered":{"type":"integer","example":1,"nullable":true},"score_percent":{"type":"number","format":"float","example":80,"nullable":true},"pass_percent":{"type":"integer","example":80,"nullable":true},"status":{"type":"string","example":"pending","enum":["pending","in_progress","passed","failed","expired"]},"status_label":{"type":"string","example":"Kutilmoqda"},"started_at":{"type":"string","format":"date-time","example":"2026-02-21 10:00:00","nullable":true},"completed_at":{"type":"string","format":"date-time","example":"2026-02-21 10:15:00","nullable":true},"expires_at":{"description":"Mustaqil test uchun vaqt chegarasi","type":"string","format":"date-time","example":"2026-02-21 10:15:00","nullable":true},"is_expired":{"type":"boolean","example":false},"duration_seconds":{"type":"integer","example":900,"nullable":true},"notes":{"type":"string","example":null,"nullable":true},"graded_by":{"type":"integer","example":null,"nullable":true},"created_by":{"type":"integer","example":1,"nullable":true},"created_at":{"type":"string","format":"date-time","example":"2026-02-21 10:00:00"},"updated_at":{"type":"string","format":"date-time","example":"2026-02-21 10:00:00"}},"type":"object"},"TrainingCenterResource":{"title":"O'quv markazi","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Toshkent viloyati OSTK"},"stir":{"type":"string","example":"305831133","nullable":true},"fio":{"type":"string","example":"Aliyev Vali Karimovich"},"mfo":{"type":"string","example":"00845","nullable":true},"account_number":{"type":"string","example":"20208000123456789012","nullable":true},"phone":{"type":"string","example":"+998901234567","nullable":true},"state_id":{"type":"integer","nullable":true},"region":{"type":"object","nullable":true},"city_id":{"type":"integer","nullable":true},"district":{"type":"object","nullable":true},"address":{"type":"string","nullable":true},"user":{"type":"object","nullable":true},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"type":"http","description":"JWT autentifikatsiya tokeni","scheme":"bearer","bearerFormat":"JWT"}}},"tags":[{"name":"Applications","description":"Arizalar boshqaruvi"},{"name":"Certificates","description":"Yangi namunadagi guvohnomalar boshqaruvi"},{"name":"Certificate Lookup","description":"Guvohnoma ma'lumotlarini passport yoki JSHSHIR orqali qidirish"},{"name":"Commission Members","description":"Komissiya a'zolari boshqaruvi"},{"name":"Dashboard","description":"Dashboard boshqaruvi"},{"name":"Exam Participants","description":"Imtihon qatnashuvchilari boshqaruvi"},{"name":"TM Instructions","description":"Yo'riqnomalar boshqaruvi"},{"name":"Locations","description":"Viloyatlar va tumanlar ro'yxati"},{"name":"TM-Agroteh Permission Management","description":"TM-Agroteh service ruxsatlarni ko'rish"},{"name":"TM-Agroteh Role Management","description":"TM-Agroteh service rollarni boshqarish"},{"name":"TM-Agroteh User Management","description":"TM-Agroteh service foydalanuvchilarni boshqarish"},{"name":"Practical Exam Sheets","description":"Amaliy imtihon varaqalari boshqaruvi"},{"name":"Practical Invoices","description":"Amaliy imtihon invoicelari boshqaruvi"},{"name":"Practical Invoice Types","description":"Amaliy imtihon to'lov turlari boshqaruvi"},{"name":"Reports","description":"Hisobotlar boshqaruvi"},{"name":"Study Class Categories","description":"O'quv sinf kategoriyalari boshqaruvi"},{"name":"Test Questions","description":"Test savollari boshqaruvi"},{"name":"Theory Exams","description":"Nazariy imtihonlar boshqaruvi"},{"name":"Theory Invoices","description":"Nazariy imtihon invoicelari boshqaruvi"},{"name":"Theory Invoice Types","description":"Nazariy imtihon to'lov turlari boshqaruvi"},{"name":"TM Candidates","description":"Nomzodlar boshqaruvi (o'quv markazi yo'q studentlar)"},{"name":"TM Certificate Bases","description":"Guvohnoma asoslari boshqaruvi"},{"name":"TM Individual Certificates","description":"Jismoniy shaxs guvohnomalari boshqaruvi"},{"name":"TM Individuals","description":"Jismoniy shaxslar boshqaruvi"},{"name":"TM Students","description":"O'quvchilar boshqaruvi"},{"name":"Training Centers","description":"O'quv markazlari boshqaruvi"},{"name":"TM Students - Sertifikat","description":"TM Students - Sertifikat"}],"security":[{"bearerAuth":[]}]}