defmodule MyApp.Balance do
use Ash.TypedStruct
typed_struct do
field :points_balance, :float
field :rewards, {:array, MyApp.Reward}, default: []
end
end
defmodule MyApp.Reward do
use Ash.TypedStruct
typed_struct do
field :name, :string
end
end
defmodule MyApp.Balance do
use Ash.TypedStruct
typed_struct do
field :points_balance, :float
field :rewards, {:array, MyApp.Reward}, default: []
end
end
defmodule MyApp.Reward do
use Ash.TypedStruct
typed_struct do
field :name, :string
end
end