ash_blog/test/support/blog/post.ex
2024-04-02 12:15:56 -04:00

24 lines
505 B
Elixir

defmodule AshBlog.Test.Post do
@moduledoc false
use Ash.Resource,
domain: AshBlog.Test.Domain,
otp_app: :ash_blog,
data_layer: AshBlog.DataLayer
actions do
default_accept :*
defaults [:create, :read, :update]
end
attributes do
uuid_primary_key :id
end
code_interface do
define :create, args: [:title, :body]
define :read, action: :read
define :stage, action: :stage
define :publish, action: :publish
define :archive, action: :archive
end
end