~ihabunek/triglav

ref: d1b5915f3e023d04850eabf702bda7207a337302 triglav/lib/triglav/schemas/osm_state.ex -rw-r--r-- 339 bytes
d1b5915fIvan Habunek Validate platform distance from route 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
defmodule Triglav.Schemas.OsmState do
  use Ecto.Schema
  import Ecto.Changeset

  @type t :: %__MODULE__{}

  schema "osm_state" do
    field :sequence_number, :integer
    field :timestamp, :utc_datetime
    timestamps()
  end

  def changeset(row, params \\ %{}) do
    row
    |> cast(params, [:sequence_number, :timestamp])
  end
end