mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
24 lines
463 B
Elixir
24 lines
463 B
Elixir
defmodule AshPostgres.Test.Profile do
|
|
@moduledoc false
|
|
use Ash.Resource,
|
|
data_layer: AshPostgres.DataLayer
|
|
|
|
postgres do
|
|
table("profile")
|
|
schema("profiles")
|
|
repo(AshPostgres.TestRepo)
|
|
end
|
|
|
|
attributes do
|
|
uuid_primary_key(:id, writable?: true)
|
|
attribute(:description, :string)
|
|
end
|
|
|
|
actions do
|
|
defaults([:create, :read, :update, :destroy])
|
|
end
|
|
|
|
relationships do
|
|
belongs_to(:author, AshPostgres.Test.Author)
|
|
end
|
|
end
|