{"id":22852177,"url":"https://github.com/migmm/events-manager","last_synced_at":"2026-01-11T13:02:03.150Z","repository":{"id":267370244,"uuid":"899239360","full_name":"migmm/events-manager","owner":"migmm","description":"This exercise is part of the tasks for Week 2 of Globant's SAP CAP Bootcamp. ","archived":false,"fork":false,"pushed_at":"2025-01-29T00:08:50.000Z","size":606,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T06:46:31.424Z","etag":null,"topics":["fiori","fiori-elements","odata","odatav4","sap","sapcap"],"latest_commit_sha":null,"homepage":"","language":"CAP CDS","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/migmm.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-12-05T21:50:54.000Z","updated_at":"2024-12-14T01:34:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ac0f785-5024-47cf-b0c7-41c5bfb8836f","html_url":"https://github.com/migmm/events-manager","commit_stats":null,"previous_names":["migmm/events-manager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/migmm/events-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/migmm%2Fevents-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/migmm%2Fevents-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/migmm%2Fevents-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/migmm%2Fevents-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/migmm","download_url":"https://codeload.github.com/migmm/events-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/migmm%2Fevents-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28304263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fiori","fiori-elements","odata","odatav4","sap","sapcap"],"created_at":"2024-12-13T06:07:26.803Z","updated_at":"2026-01-11T13:02:03.126Z","avatar_url":"https://github.com/migmm.png","language":"CAP CDS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Events Tickets SAP CAP API\n\n\u003cimg align=\"center\" src=\"assets/sap-logo.png\" alt=\"Sap logo\"/\u003e\n\nHay una [Versión en español](README_es.md) de este archivo.\n\nThis document provides an overview of the Events Tickets API, including instructions on how to use it, available routes, and details about its implementation. \n\nThis exercise is part of the tasks for Week 2 of Globant's SAP CAP Bootcamp.\n\n## Introduction\n\nThe Events Tickets API enables management of events, tickets, and users. It provides CRUD operations for each entity and includes a custom endpoint for purchasing tickets.\n\n## Prerequisites\n\n    Node.js (v14 or higher)\n    npm (v6 or higher)\n    CAP Framework\n    HANA Database\n\n## How to Run\n\nClone the repository:\n\n```sh\ngit clone git clone https://github.com/migmm/events-manager.git\ncd events-manager\n```\n\nInstall dependencies:\n\n```sh\nnpm install\n```\n\nStart the service:\n\n```sh\ncds watch --profile hybrid\n```\n\n    You need to have HANA activated to load and work with the dummy data tables.\n\n## Functionality\n\nThis application retrieves a list of events and allows users to buy tickets, adding the ticket to the corresponding **Ticket** table.\n\nBy default, CAP exposes CRUD operations for the routes defined in the service. However, custom routes can be added for specific operations. A custom route has been included to “buy” a ticket.\n\nCustom Route to Buy a Ticket\n\nRequest:\n\n```sh\nPOST http://localhost:4004/odata/v4/events-tickets/BuyTicket\ncontent-type: application/json\n\n{\n  \"Event_ID\": \"EVT10\",\n  \"User_ID\": \"USR26\"\n}\n```\n\n    Event_ID: ID of the event.\n    User_ID: ID of the user.\n\n## Entities\n\n### Relationships Between Entities\n\nThe CDS model includes three main entities: Events, Tickets, and Users. Their relationships are defined as follows:\n\n- Tickets to Events: The Tickets entity is associated with the Events entity via the Event_ID field, establishing a Many-to-One relationship (an event can have many tickets) explicitly defined in the Events entity with:\n\n```javascript\n    Tickets: Composition of many Tickets on Tickets.Event_ID = $self;\n```\n\n- Tickets to Users: The Tickets entity is associated with the Users entity via the User_ID field. The relation is one to one.\n\n\n### Annotations\n\n    cuid: Automatically generates a unique identifier for each record, ensuring uniqueness without manually specifying IDs.\n    managed: Adds common fields managed by the system, such as createdAt, createdBy, modifiedAt, and modifiedBy. These fields are auto-populated when records are created or updated.\n\n### Validations\n\nValidation has been implemented using **@assert**.\n\nFullStack Implementation\n\nThe project includes Fiori elements for front-end visualization. By default, it provides table views in HTML for the entities.\n\nThere are some screen captures that FIORI provides by default.\n\nEvents screen\n\n\u003cimg align=\"center\" src=\"assets/events-screen.png\" alt=\"Events screen\"/\u003e\n\nTickets screen\n\u003cimg align=\"center\" src=\"assets/tickets-screen.png\" alt=\"Tickets screen\"/\u003e\n\nUsers screen\n\u003cimg align=\"center\" src=\"assets/users-screen.png\" alt=\"Users screen\"/\u003e\n\n## Dummy Data\n\nDummy data is included in the db/data directory to facilitate testing. This data can populate the database for API testing.\nREST Client File\n\n## REST Client File\n\nA [HTTP request file](rest-client.http) to be used in [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension for VSCode. is included in the root directory. It contains pre-configured requests for all API endpoints.\n\n## Source Information\n\n- https://community.sap.com/t5/technology-blogs-by-sap/understanding-entity-relationships-in-cds/ba-p/13552921\n- https://developers.sap.com/mission.hana-cloud-cap.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmigmm%2Fevents-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmigmm%2Fevents-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmigmm%2Fevents-manager/lists"}