aboutsummaryrefslogtreecommitdiff
path: root/web/models
diff options
context:
space:
mode:
Diffstat (limited to 'web/models')
-rw-r--r--web/models/audio_file_api.ex23
1 files changed, 23 insertions, 0 deletions
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