parent
7fc50ca8d5
commit
d8fb41e08c
@ -0,0 +1,25 @@
|
|||||||
|
defmodule DecentralisedBookIndex.Metadata.Author do
|
||||||
|
use Ash.Resource,
|
||||||
|
otp_app: :decentralised_book_index,
|
||||||
|
domain: DecentralisedBookIndex.Metadata
|
||||||
|
|
||||||
|
actions do
|
||||||
|
defaults [:read]
|
||||||
|
end
|
||||||
|
|
||||||
|
attributes do
|
||||||
|
uuid_primary_key :id
|
||||||
|
|
||||||
|
attribute :name, :string do
|
||||||
|
allow_nil? false
|
||||||
|
public? true
|
||||||
|
end
|
||||||
|
|
||||||
|
attribute :description, :string do
|
||||||
|
allow_nil? false
|
||||||
|
public? true
|
||||||
|
end
|
||||||
|
|
||||||
|
timestamps()
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue