Packages

Library for using Calendar with Ecto. Made for Ecto version older than 2.1. This lets you save Calendar types in Ecto and work with date-times in multiple timezones.

Current section

Files

Jump to
calecto lib calecto model.ex
Raw

lib/calecto/model.ex

defmodule Calecto.Model do
@moduledoc """
This module name is deprecated in favor of `Calecto.Schema`
Simply use the model name `Calecto.Schema` instead of `Calecto.Model`.
See docs for `Calecto.Schema`
"""
@default_timestamps_opts [type: Calecto.DateTimeUTC]
defmacro __using__(opts) do
quote do
@timestamps_opts unquote(Dict.merge(opts, @default_timestamps_opts))
end
end
end