~ihabunek/triglav

ref: f66c43139d76b7a26925de4e29498ff1473c0950 triglav/lib/triglav/schemas/zet/route.ex -rw-r--r-- 710 bytes
f66c4313Ivan Habunek Store sample trip ID in derived data, simplify schemas 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
defmodule Triglav.Schemas.Zet.Route do
  use Ecto.Schema
  alias Triglav.Schemas.Error

  @derive {Inspect, only: [:id]}
  @primary_key false
  @schema_prefix :zet

  schema "routes" do
    field :id, :string, source: :route_id, primary_key: true
    field :agency_id, :string, source: :agency_id
    field :short_name, :string, source: :route_short_name
    field :long_name, :string, source: :route_long_name
    field :desc, :string, source: :route_desc
    field :type, :integer, source: :route_type
    field :url, :string, source: :route_url
    field :color, :string, source: :route_color
    field :text_color, :string, source: :route_text_color

    has_many :errors, Error, references: :id
  end
end