mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-21 13:53:20 +12:00
24 lines
461 B
Elixir
24 lines
461 B
Elixir
|
defmodule AshGraphql.Test.MovieActor do
|
||
|
@moduledoc false
|
||
|
|
||
|
use Ash.Resource,
|
||
|
domain: AshGraphql.Test.Domain,
|
||
|
data_layer: Ash.DataLayer.Ets
|
||
|
|
||
|
actions do
|
||
|
defaults([:create, :update, :destroy, :read])
|
||
|
end
|
||
|
|
||
|
relationships do
|
||
|
belongs_to :movie, AshGraphql.Test.Movie do
|
||
|
primary_key?(true)
|
||
|
allow_nil?(false)
|
||
|
end
|
||
|
|
||
|
belongs_to :actor, AshGraphql.Test.Actor do
|
||
|
primary_key?(true)
|
||
|
allow_nil?(false)
|
||
|
end
|
||
|
end
|
||
|
end
|