Noizu.Entities (NoizuLabs Entities v0.2.1)

Noizu Entities are Structs with meta data for permissions, json encoding, persistence channels, cache and more.

To use define your entity and repo module:

defmodule MyApp.Versioned.Descriptions.Description do
  use Noizu.Entities
  
  @vsn 1.0
  @repo MyApp.Versioned.Descriptions
  @sref "versioned-description"
  @persistence ecto_store(MyApp.Schema.Versions.Descriptions.Description, MyApp.Repo)
  def_entity do
    id :uuid
    field :title, nil, :string
    field :body, nil, :string
    field :time_stamp, nil, Noizu.Entity.TimeStamp
  end
end

defmodule MyApp.Versioned.Descriptions do
    use Noizu.Entities
    def_repo()
end