{"id":17028301,"url":"https://github.com/devkiloton/assignment","last_synced_at":"2025-03-22T19:46:00.467Z","repository":{"id":236996472,"uuid":"792687112","full_name":"devkiloton/Assignment","owner":"devkiloton","description":"The guys from Payaut gave me an assignment, that's the result...","archived":false,"fork":false,"pushed_at":"2024-05-01T19:39:38.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T15:21:56.120Z","etag":null,"topics":["h2","java","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/devkiloton.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}},"created_at":"2024-04-27T09:26:44.000Z","updated_at":"2024-07-01T08:33:37.000Z","dependencies_parsed_at":"2024-04-29T15:31:28.623Z","dependency_job_id":null,"html_url":"https://github.com/devkiloton/Assignment","commit_stats":null,"previous_names":["devkiloton/assignment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkiloton%2FAssignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkiloton%2FAssignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkiloton%2FAssignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkiloton%2FAssignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devkiloton","download_url":"https://codeload.github.com/devkiloton/Assignment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245013996,"owners_count":20547178,"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","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":["h2","java","spring-boot"],"created_at":"2024-10-14T07:53:33.552Z","updated_at":"2025-03-22T19:46:00.438Z","avatar_url":"https://github.com/devkiloton.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST service (100% Java)\n\n```mermaid\nerDiagram\n    item {\n        bigint id PK\n        timestamp created_at\n        varchar item_name\n        enum item_type\n        enum item_unit\n        bigint discount_id FK\n    }\n\n discount {\n        bigint id PK\n        enum discount_unit\n        boolean is_constant_slab\n    }\n\n    discount_slab {\n        bigint id PK\n        double discount_amount\n        bigint units_to_get_discount\n        bigint discount_id FK\n    }\n\n    discount ||--|{ discount_slab : discount_id\n    discount |o --|| item : discount_id\n```\n## Documentation\nAll the endpoints and possible requests/exceptions are documented in Postman(and many of them in Javadoc). The requisitions are with fulfilled bodies and ready to be tested locally\n\n\u003ca href=\"https://documenter.getpostman.com/view/16889380/2sA3BuWUZa#b0fa6b13-1953-4e33-9cdd-9451b3ead934\" target=\"_blank\"\u003e\u003cimg src=\"https://run.pstmn.io/button.svg\" alt=\"Run in Postman\"\u003e\u003c/a\u003e\n\n## How it works?\n\u003cimg width=\"1423\" alt=\"Capture d’écran 2024-04-29 à 09 17 59\" src=\"https://github.com/devkiloton/Payaut-assignment/assets/78966160/e958274a-b02b-4907-a899-ead349d73908\"\u003e\n\n## The DB\nI have used H2 in memory db (100% Java), so if you want to take a look in the tables access `/api/v1/h2` and you will have access to the console (credentials in the application.properties)\n\nhttps://github.com/devkiloton/Payaut-assignment/assets/78966160/3e8e9065-042d-4fe1-8e80-35f230b6c907\n\n## Item's cheat sheet\nUse these identifiers (default data) to interact with the API\n| ID   | CREATED_AT          | ITEM_NAME    | ITEM_PRICE   | ITEM_TYPE   | ITEM_UNIT   | DISCOUNT_ID   |\n|------|---------------------|--------------|--------------|-------------|-------------|---------------|\n| 1    | 2024-04-24 10:00:00 | Vegetables   | 0.01         | VEGETABLES  | GRAM        | 1             |\n| 2    | 2024-04-24 11:00:00 | Dutch Beer   | 0.5          | BEERS       | PIECE       | 2             |\n| 3    | 2024-04-25 11:00:00 | Bread        | 1.0          | BREADS      | PIECE       | 3             |\n| 4    | 2024-04-24 11:00:00 | Belgium Beer | 0.75         | BEERS       | PIECE       | 4             |\n| 5    | 2024-04-24 11:00:00 | German Beer  | 1.0          | BEERS       | PIECE       | 5             |\n\n### Other projects you might like\n[Laravel ambassador](https://github.com/devkiloton/laravel-ambassador)\nA monolith built with PHP, Docker, MySQL and Redis\n\n[Main Chainz API](https://github.com/devkiloton/main-chainz-restful-api)\nAn open source Nodejs api built with MySQL, Redis, and many other technologies\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkiloton%2Fassignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevkiloton%2Fassignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkiloton%2Fassignment/lists"}