defmodule MyApp.Data.State do
@moduledoc false
use Ash.Resource
actions do
defaults [:create, :update, :read, :destroy]
end
attributes do
uuid_primary_key :state_id
attribute :name, :string do
allow_nil? false
end
attribute :url, :string do
allow_nil? true
end
end
relationships do
has_one :region, MyApp.Data.Region
end
end
defmodule MyApp.Data.State do
@moduledoc false
use Ash.Resource
actions do
defaults [:create, :update, :read, :destroy]
end
attributes do
uuid_primary_key :state_id
attribute :name, :string do
allow_nil? false
end
attribute :url, :string do
allow_nil? true
end
end
relationships do
has_one :region, MyApp.Data.Region
end
end