An open API service indexing awesome lists of open source software.

https://github.com/andridus/bee

Cria uma API para uma entidade Ecto
https://github.com/andridus/bee

api ecto elixir lib phoenix productivity web

Last synced: 8 months ago
JSON representation

Cria uma API para uma entidade Ecto

Awesome Lists containing this project

README

          

# Bee

Documentation for [Bee](https://hexdocs.pm/bee/Bee.html).

Bee generate an Api for given Ecto Schema.

For example, you could specify a `User` entity as follows:

```elixir
defmodule User do

use Ecto.Schema
use Bee.Schema

generate_bee do
schema "users" do
field :name, :string
field :password, :string
field :permission, Ecto.Enum, values: [:basic, :manager, :admin], default: :basic
timestamps()
end
end

defmodule Api do
@schema User
use Bee.Api
end

end

User.Api.all(where: [permission: :basic])
```

## Installation

The package can be installed by adding `bee` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:bee, "~> 0.4.3"}
]
end
```

## To Do
- [x] Bee
- [ ] Worker Bee