Add the datalayer and a migration for books.

This commit is contained in:
2025-03-04 21:59:06 +02:00
parent 08e1c843cc
commit 628f0a2dc8
3 changed files with 116 additions and 1 deletions
+7 -1
View File
@@ -1,7 +1,13 @@
defmodule DecentralisedBookIndex.Books.Book do
use Ash.Resource,
otp_app: :decentralised_book_index,
domain: DecentralisedBookIndex.Books
domain: DecentralisedBookIndex.Books,
data_layer: AshPostgres.DataLayer
postgres do
table "books"
repo DecentralisedBookIndex.Repo
end
actions do
defaults [:read]