Current section
Files
Jump to
Current section
Files
lib/network.ex
defmodule CloudAPI.Network do
@moduledoc """
This structure represents a CloudAPI Network
"""
use Ecto.Schema
@primary_key {:id, Ecto.UUID, autogenerate: true}
embedded_schema do
field :name, :string
field :description, :string
field :public, :boolean
field :fabric, :boolean
field :subnet, :string
field :provision_start_ip, :string
field :provision_end_ip, :string
field :gateway, :string
field :resolvers, :string
field :internet_nat, :boolean
end
end
defmodule CloudAPI.Network.IP do
@moduledoc """
This structure represents a CloudAPI Network IP
"""
use Ecto.Schema
@primary_key false
embedded_schema do
field :ip, :string
field :reserved, :boolean
field :managed, :boolean
field :owner_uuid, Ecto.UUID
field :belongs_to_uuid, Ecto.UUID
end
end