Update the Book to add language, format, page_count, published date.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -19,6 +19,10 @@ defmodule DecentralisedBookIndex.Metadata do
|
||||
args: [
|
||||
:title,
|
||||
:description,
|
||||
:language,
|
||||
:format,
|
||||
:page_count,
|
||||
:published,
|
||||
:bids,
|
||||
:author_roles,
|
||||
:publisher_id,
|
||||
@@ -27,7 +31,7 @@ defmodule DecentralisedBookIndex.Metadata do
|
||||
|
||||
define :add_book_to_related_editions_registry,
|
||||
action: :add_book_to_related_editions_registry,
|
||||
args: [:title, :description, :bids, :author_roles, :publisher_id, :related_book_id]
|
||||
args: [:title, :description, :language, :format, :page_count, :published, :bids, :author_roles, :publisher_id, :related_book_id]
|
||||
|
||||
define :list_books, action: :read
|
||||
define :get_book_by_id, args: [:id], action: :by_id
|
||||
|
||||
@@ -17,7 +17,7 @@ defmodule DecentralisedBookIndex.Metadata.Book do
|
||||
|
||||
create :create do
|
||||
primary? true
|
||||
accept [:title, :description, :publisher_id, :book_editions_registry_id]
|
||||
accept [:title, :description, :format, :language, :page_count, :published, :publisher_id, :book_editions_registry_id]
|
||||
argument :bids, {:array, :map}
|
||||
argument :author_roles, {:array, :map}
|
||||
|
||||
@@ -38,7 +38,7 @@ defmodule DecentralisedBookIndex.Metadata.Book do
|
||||
end
|
||||
|
||||
create :add_book_to_related_editions_registry do
|
||||
accept [:title, :description, :publisher_id]
|
||||
accept [:title, :description, :format, :language, :page_count, :published, :publisher_id]
|
||||
|
||||
argument :related_book_id, :uuid do
|
||||
allow_nil? false
|
||||
@@ -115,6 +115,26 @@ defmodule DecentralisedBookIndex.Metadata.Book do
|
||||
public? true
|
||||
end
|
||||
|
||||
attribute :published, :date do
|
||||
allow_nil? false
|
||||
public? true
|
||||
end
|
||||
|
||||
attribute :language, :string do
|
||||
allow_nil? false
|
||||
public? true
|
||||
end
|
||||
|
||||
attribute :format, :string do
|
||||
allow_nil? false
|
||||
public? true
|
||||
end
|
||||
|
||||
attribute :page_count, :integer do
|
||||
allow_nil? false
|
||||
public? true
|
||||
end
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user