Skip to content

andridus/bee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bee

Documentation for Bee.

Bee generate an Api for given Ecto Schema.

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

  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:

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

To Do

  • Bee
  • Worker Bee