defmodule DaProductApp.Activity.CustomTransactionsLog do import Ecto.Query, warn: false alias DaProductApp.Repo alias DaProductApp.Activity.CustomTransactionLog @doc """ Returns the list of custom transaction logs. """ def list_custom_transaction_logs do Repo.all(CustomTransactionLog) end @doc """ Gets a single custom transaction log by ID. """ def get_custom_transaction_log!(id), do: Repo.get!(CustomTransactionLog, id) @doc """ Creates a custom transaction log entry. """ def create_custom_transaction_log(attrs \\ %{}) do %CustomTransactionLog{} |> CustomTransactionLog.changeset(attrs) |> Repo.insert() end @doc """ Updates a custom transaction log entry. """ def update_custom_transaction_log(%CustomTransactionLog{} = custom_transaction_log, attrs) do custom_transaction_log |> CustomTransactionLog.changeset(attrs) |> Repo.update() end @doc """ Deletes a custom transaction log entry. """ def delete_custom_transaction_log(%CustomTransactionLog{} = custom_transaction_log) do Repo.delete(custom_transaction_log) end @doc """ Returns an `%Ecto.Changeset{}` for tracking custom transaction log changes. """ def change_custom_transaction_log(%CustomTransactionLog{} = custom_transaction_log, attrs \\ %{}) do CustomTransactionLog.changeset(custom_transaction_log, attrs) end end