Add the DBI Server resource.
This commit is contained in:
@@ -5,5 +5,6 @@ defmodule DecentralisedBookIndex.Metadata do
|
||||
resources do
|
||||
resource DecentralisedBookIndex.Metadata.Book
|
||||
resource DecentralisedBookIndex.Metadata.Author
|
||||
resource DecentralisedBookIndex.Metadata.DBIServer
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
defmodule DecentralisedBookIndex.Metadata.DBIServer 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 :url, :string do
|
||||
allow_nil? false
|
||||
public? true
|
||||
end
|
||||
|
||||
timestamps()
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user