mirror of
https://github.com/ash-project/ash_blog.git
synced 2024-09-21 13:52:56 +12:00
24 lines
505 B
Elixir
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
|