init commit

This commit is contained in:
2024-07-13 15:12:19 -04:00
commit 8668405143
61 changed files with 3123 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
defmodule HereIAm.Devices.Device do
use Ecto.Schema
import Ecto.Changeset
schema "devices" do
field :ip_address, :string
field :audio, :string
timestamps(type: :utc_datetime)
end
@doc false
def changeset(device, attrs) do
device
|> cast(attrs, [:ip_address, :audio])
|> validate_required([:ip_address, :audio])
end
end