Skip to content

Instantly share code, notes, and snippets.

@synepis
Created October 28, 2017 11:34
Show Gist options
  • Save synepis/aec7f5292db685051b62c87ccf8ee216 to your computer and use it in GitHub Desktop.
Save synepis/aec7f5292db685051b62c87ccf8ee216 to your computer and use it in GitHub Desktop.
Xml model
defmodule PportView do
defstruct [
:journeys, # list of Journey
:associations # list of Association
]
end
defmodule Journey do
defstruct[
:rid,
:uid,
:train_id,
:ssd,
:toc,
:or, #OR
:opor, #OPOR, if missing should be nil
:ips, #list of IP
:opips,
:pps,
:dt,
:opdt
]
end
defmodule OR do
defstruct[
:tpl, :act, :plan_act, :can,
:pta, :ptd,
:wta, :wtd,
:fd
]
end
defmodule OPOR do
defstruct[
:tpl, :act, :plan_act, :can,
:pta, :ptd,
:wta, :wtd,
:fd
]
end
defmodule IP do
defstruct[
:tpl, :act, :plan_act, :can,
:pta, :ptd,
:wta, :wtd,
:rdelay,
:fd
]
end
defmodule Association do
defstruct [
:rid,
:tiploc,
:category,
:is_cancelled,
:is_deleted,
:main, # AssocService
:assoc # AssocService
]
end
defmodule AssocService do
defstruct [
:rid,
:wta,
:wtd,
:wtp,
:pta,
:ptd
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment