{"id":26612300,"url":"https://github.com/temirovuz/anhor-v2","last_synced_at":"2026-05-16T11:02:22.098Z","repository":{"id":284010313,"uuid":"953345537","full_name":"temirovuz/anhor-v2","owner":"temirovuz","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-24T17:33:20.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T21:06:50.157Z","etag":null,"topics":["djan","django-rest-framework","postgresql","psycopg2","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/temirovuz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-23T06:14:40.000Z","updated_at":"2025-03-24T17:33:24.000Z","dependencies_parsed_at":"2025-03-23T17:24:33.500Z","dependency_job_id":"806326b7-d7ad-4d5f-8a79-2582366fd8e1","html_url":"https://github.com/temirovuz/anhor-v2","commit_stats":null,"previous_names":["temirovuz/anhor-v2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/temirovuz/anhor-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temirovuz%2Fanhor-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temirovuz%2Fanhor-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temirovuz%2Fanhor-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temirovuz%2Fanhor-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temirovuz","download_url":"https://codeload.github.com/temirovuz/anhor-v2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temirovuz%2Fanhor-v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280901420,"owners_count":26410586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["djan","django-rest-framework","postgresql","psycopg2","python3"],"created_at":"2025-03-24T03:17:31.081Z","updated_at":"2025-10-25T04:02:20.475Z","avatar_url":"https://github.com/temirovuz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Anhor Korxonasining ishchilar davomatini olib boruvchi loyiha\n\n1. **Product** - (Maxsulotlar)\n    * ``name`` - Maxsulot nomi\n    * ``price_per_unit`` - 1 dona chiqaril maxsulot uchun tolanadigan summa.\n2. **Employee** - (Ishchilar)\n    * ``status`` - Ishchi statusi yani (``yangi``, ``doimiy`` ``...``)\n    * ``full_name`` - Ishchining ``Ism familiasi``\n3. **Daily Production** - (Kunlik ishlab chiqarish)\n    * ``date`` - Sana yani qaysi kunga tegishli ekanligi\n    * ``product`` - Mahsulot\n    * ``quantity`` - Mahsulot chiqarilgan soni\n    * ``total_amount`` - To'lanadigan summa ``avtomatik hisoblanadi``\n4. **Attendance** - (Ishchilar davomati)\n    * ``employee`` - Ishchi\n    * ``check_in`` - Kelish vaqti\n    * ``check_out`` - Ketish vaqti\n    * ``worked_hours`` - kun davomida ishlagan vaqti (``Avtomatik hisoblanadi``)\n5. **SalaryRecord** - (Ishchilar olgan ish haqqilari ro'yxati)\n    * ``employee`` - Ishchi\n    * ``start_date`` - ish haqini boshlanish sanasi\n    * ``end_date`` - ish haqini tugash sanasi\n    * ``total_amount`` - Oladigan ish haqqisi (``Avtomatik hisoblanadi``)\n\n* ``requirements.txt`` Loyiha uchun kerakli **package**lar.\n\n      pip install -r requirements.txt\n\n## Api ``Qo'llanma``\n\n\u003cbr\u003e\n\n| Method   | Description                                                                                    |\n|----------|------------------------------------------------------------------------------------------------|\n| `GET`    | Bitta element yoki elementlar to'plamini olish uchun ishlatiladi.                              |\n| `POST`   | Yangi narsalarni yaratishda foydalaniladi, masalan: yangi ishchi, maxsulot ...                 |\n| `PATCH`  | Elementdagi bir yoki bir nechta maydonlarni yangilash uchun ishlatiladi.                       |\n| `PUT`    | Butun elementni (barcha maydonlarni) yangi ma'lumotlar bilan almashtirish uchun foydalaniladi. |\n| `DELETE` | Elementni o'chirish uchun ishlatiladi.                                                         |\n\n\u003cbr\u003e\n\n| Method   | URL                                      | Description                           |\n|----------|------------------------------------------|---------------------------------------|\n| `GET`    | `/api/employee`                          | Barcha ishchilarni olish.             |\n| `POST`   | `/api/employee`                          | Yangi ishchi yaratish.                |\n| `GET`    | `/api/employee/28`                       | №28 ishchini olish.                   |\n| `PATCH`  | `/api/employee/28`                       | Ishchini ma'lumotlarni yangilash #28. |\n| `DELETE` | `/api/employee/28` or `/api/employee/50` | Ishchini o'chirish                    |\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## HTTP javob holati kodlari\n\nBu API ishlatayotganda server tomonidan qaytariladigan muhim status xabarlaridir. Har bir kod ma'lum bir holatni\nbildiradi va tushunish oson bo'lishi uchun turlarga bo'lingan.\n\n### Asosiy HTTP Status Kodlari:\n\n| Code  | Title                   | Description                                                                                   |\n|-------|-------------------------|-----------------------------------------------------------------------------------------------|\n| `200` | `OK`                    | So'rov muvaffaqiyatli bajarildi (masalan. foydalanganda `GET`, `PATCH`, `PUT` yoki `DELETE`). |\n| `201` | `Created`               | Yangi resurs yaratildi (masalan, POST so'rovi orqali).                                        |\n| `400` | `Bad request`           | So'rov noto'g'ri yuborilgan (masalan, majburiy maydonlar yo'q)                                |\n| `401` | `Unauthorized`          | Foydalanuvchi avtorizatsiyadan o'tmagan.                                                      |\n| `403` | `Forbidden`             | Foydalanuvchiga ruxsat yo'q (avtorizatsiyadan o'tgan bo'lsa ham).                             |\n| `404` | `Not found`             | So'ralgan resurs topilmadi.                                                                   |\n| `500` | `Internal server error` | Serverda kutilmagan xato yuz berdi.                                                           |\n| `502` | `Bad Gateway`           | Gateway yoki proxy server noto'g'ri javob qaytardi.                                           |\n| `503` | `Service Unavailable`   | Server hozircha ishlamayapti (vaqtincha).                                                     |\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n### Employee example\n\n* ``Post method``\n\n   \n       {\n           \"status\": \"yangi\",\n           \"full_name\": \"Temirov Muhammad\"\n       }\n\n* ``Get method``\n\n\n       [\n         {\n           \"id\": 3,\n           \"status\": \"yangi\",\n           \"full_name\": \"user - 1\"\n         },\n         {\n           \"id\": 4,\n           \"status\": \"yangi\",\n           \"full_name\": \"user - 2\"\n         },\n         {\n           \"id\": 5,\n           \"status\": \"yangi\",\n           \"full_name\": \"user - 3\"\n         },\n         {\n           \"id\": 6,\n           \"status\": \"yangi\",\n           \"full_name\": \"user - 4\"\n         },\n         {\n           \"id\": 7,\n           \"status\": \"yangi\",\n           \"full_name\": \"user - 5\"\n         }\n       ]\n\n### Daily Production example\n\n* ``Post method``\n\n   \n       {\n         \"date\": \"2025-03-24\",\n         \"product\": 4,\n         \"quantity\": 1000\n       }\n\n* ``Get method``\n\n   \n       [\n         {\n           \"id\": 1,\n           \"date\": \"2025-03-24\",\n           \"product_name\": \"Anhor 1 litr\",\n           \"quantity\": 10,\n           \"total_amount\": \"1000.00\"\n         },\n         {\n           \"id\": 2,\n           \"date\": \"2025-03-24\",\n           \"product_name\": \"shafaq 1 litr\",\n           \"quantity\": 100,\n           \"total_amount\": \"12000.00\"\n         },\n         {\n           \"id\": 3,\n           \"date\": \"2025-03-24\",\n           \"product_name\": \"4.2 anhor\",\n           \"quantity\": 1000,\n           \"total_amount\": \"250000.00\"\n         }\n       ]\n\n### Attendance check In example\n\n* ``Post method``\n   \n   \n       {\n          \"employee_ids\": [2, 3, 5, 6, 7],\n          \"check_in_time\": \"2025-03-23T09:00:00Z\"\n       }\n\n* ``Get method``\n\n   \n       {\n         \"count\": 13,\n         \"employees\": [\n           {\n               \"id\": 3,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 1\"\n           },\n           {\n               \"id\": 4,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 2\"\n           },\n           {\n               \"id\": 5,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 3\"\n           },\n           {\n               \"id\": 6,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 4\"\n           },\n           {\n               \"id\": 7,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 5\"\n           }\n         ]\n       }\n\n\n\n### Attendance check out example\n\n* ``Post method``\n\n\n       {\n          \"employee_ids\": [2, 3, 5, 6, 7],\n          \"check_out_time\": \"2025-03-24T09:00:00Z\"\n       }\n\n* ``Get method``\n\n   \n       {\n         \"success\": true,\n         \"message\": \"Successfully checked out 5 employees\",\n         \"processed\": [\n           {\n               \"id\": 2,\n               \"status\": \"yangi\",\n               \"full_name\": \"Temirov Jahaongir\"\n           },\n           {\n               \"id\": 3,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 1\"\n           },\n           {\n               \"id\": 5,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 3\"\n           },\n           {\n               \"id\": 6,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 4\"\n           },\n           {\n               \"id\": 7,\n               \"status\": \"yangi\",\n               \"full_name\": \"user - 5\"\n           }\n         ],\n         \"not_processed\": [],\n         \"attendances\": [\n           {\n               \"id\": 6,\n               \"employee\": 2,\n               \"employee_name\": \"Temirov Jahaongir\",\n               \"check_in\": \"2025-03-23T14:00:00+05:00\",\n               \"check_out\": \"2025-03-24T14:00:00+05:00\",\n               \"worked_hours\": \"24.00\"\n           },\n           {\n               \"id\": 7,\n               \"employee\": 3,\n               \"employee_name\": \"user - 1\",\n               \"check_in\": \"2025-03-23T14:00:00+05:00\",\n               \"check_out\": \"2025-03-24T14:00:00+05:00\",\n               \"worked_hours\": \"24.00\"\n           },\n           {\n               \"id\": 8,\n               \"employee\": 5,\n               \"employee_name\": \"user - 3\",\n               \"check_in\": \"2025-03-23T14:00:00+05:00\",\n               \"check_out\": \"2025-03-24T14:00:00+05:00\",\n               \"worked_hours\": \"24.00\"\n           },\n           {\n               \"id\": 9,\n               \"employee\": 6,\n               \"employee_name\": \"user - 4\",\n               \"check_in\": \"2025-03-23T14:00:00+05:00\",\n               \"check_out\": \"2025-03-24T14:00:00+05:00\",\n               \"worked_hours\": \"24.00\"\n           },\n           {\n               \"id\": 10,\n               \"employee\": 7,\n               \"employee_name\": \"user - 5\",\n               \"check_in\": \"2025-03-23T14:00:00+05:00\",\n               \"check_out\": \"2025-03-24T14:00:00+05:00\",\n               \"worked_hours\": \"24.00\"\n           }\n        ]\n   \n    }","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemirovuz%2Fanhor-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemirovuz%2Fanhor-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemirovuz%2Fanhor-v2/lists"}