https://github.com/brandaoplaster/flight_reservations
Application for managing flight reservations :flight_departure:
https://github.com/brandaoplaster/flight_reservations
elixir
Last synced: about 1 year ago
JSON representation
Application for managing flight reservations :flight_departure:
- Host: GitHub
- URL: https://github.com/brandaoplaster/flight_reservations
- Owner: brandaoplaster
- Created: 2021-04-21T04:31:28.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-02-01T00:33:05.000Z (over 4 years ago)
- Last Synced: 2025-02-03T23:43:13.309Z (over 1 year ago)
- Topics: elixir
- Language: Elixir
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flight Reservations
Application for managing flight reservations.
# Guide
- Starting the agents
```
FlightReservations.start_agents
```
- User parameters
```
params_user = %{name: "phoenix", email: "p@gmail.com", cpf: "00013890"}
```
- Creating a user
```
{:ok, id} = FlightReservations.create_or_update_user(params_user)
```
- Booking parameters
```
params_booking = %{complete_date: "2021-04-17 14:00:00",
origin_city: "New city",
destination_city: "Last City",
user_id: id}
```
- Creating a booking
```
{:ok, booking_id} = FlightReservations.create_or_update_booking(params_booking)
```
- Fetching a booking by id
```
FlightReservations.get_booking(booking_id)
```
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `flight_reservations` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:flight_reservations, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/flight_reservations](https://hexdocs.pm/flight_reservations).