Packages

Elixir ACL library for managing user abilities and permissions with support of ecto(uuid) and compatibility with absinthe

Current section

Files

Jump to
terminator_uuid lib terminator schema.ex
Raw

lib/terminator/schema.ex

defmodule Terminator.UUID.Schema do
@moduledoc false
defmacro __using__(_options) do
type = Terminator.UUID.Config.key_type()
case type do
:binary_id ->
quote do
use Ecto.Schema
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
end
_ ->
quote do
use Ecto.Schema
end
end
end
end