initial book review schema

This commit is contained in:
Daniel Yrovas 2025-01-09 21:43:05 +11:00
parent e218290e08
commit 90414e6b93
Signed by: danielyrovas
SSH key fingerprint: SHA256:1avlGZQpGW038lBkNI5lOS7f0hIPM7ecJen2/P1MCCU
15 changed files with 653 additions and 0 deletions

View file

@ -0,0 +1,24 @@
defmodule Wild.BookReadsFixtures do
@moduledoc """
This module defines test helpers for creating
entities via the `Wild.BookReads` context.
"""
@doc """
Generate a book_read.
"""
def book_read_fixture(attrs \\ %{}) do
{:ok, book_read} =
attrs
|> Enum.into(%{
progress: 42,
rating: 42,
read_finish: ~U[2025-01-08 10:31:00Z],
read_start: ~U[2025-01-08 10:31:00Z],
thoughts: "some thoughts"
})
|> Wild.BookReads.create_book_read()
book_read
end
end