Update AuthorRole and BookId for sync Book data.

This commit is contained in:
2025-04-08 17:37:41 +03:00
parent 74570c81a1
commit f4c11b99e3
3 changed files with 208 additions and 5 deletions
@@ -25,7 +25,7 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
create :create do
primary? true
accept [:order, :role]
accept [:id, :order, :role]
argument :author_id, :uuid
change fn changeset, _ ->
@@ -75,7 +75,7 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
end
attributes do
uuid_primary_key :id
uuid_primary_key :id, writable?: true
attribute :role, :string do
allow_nil? true
@@ -25,12 +25,12 @@ defmodule DecentralisedBookIndex.Metadata.BookId do
create :create do
primary? true
accept [:type, :bid, :order]
accept [:id, :type, :bid, :order]
end
update :update do
primary? true
accept [:type, :bid, :order]
accept [:id, :type, :bid, :order]
end
read :by_id do
@@ -41,7 +41,7 @@ defmodule DecentralisedBookIndex.Metadata.BookId do
end
attributes do
uuid_primary_key :id
uuid_primary_key :id, writable?: true
attribute :type, :string do
allow_nil? false