From 120bf89930ce7e136ba0b0499bce7b0f8b95f296 Mon Sep 17 00:00:00 2001 From: neodarz Date: Mon, 6 Feb 2017 16:52:00 +0100 Subject: Add a not secure function for upload files with curl --- web/models/audio_file_api.ex | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 web/models/audio_file_api.ex (limited to 'web/models') diff --git a/web/models/audio_file_api.ex b/web/models/audio_file_api.ex new file mode 100644 index 0000000..15f2e42 --- /dev/null +++ b/web/models/audio_file_api.ex @@ -0,0 +1,23 @@ +defmodule TheTranscriberBackend.AudioFileAPI do + use TheTranscriberBackend.Web, :model + + #schema "audio_file_api" do + #belongs_to :audio_path, TheTranscriberBackend.AudioPath + + schema "audio_file" do + field :audio_path, :string + field :transcription_file_path, :string + field :audio_duration, :string + + timestamps() + end + + @doc """ + Builds a changeset based on the `struct` and `params`. + """ + def changeset(struct, params \\ %{}) do + struct + |> cast(params, []) + |> validate_required([]) + end +end -- cgit v1.2.1