mirror of
https://github.com/ash-project/ash_csv.git
synced 2024-09-20 21:32:48 +12:00
25 lines
409 B
Elixir
25 lines
409 B
Elixir
defmodule AshCsv.Test.Comment do
|
|
@moduledoc false
|
|
use Ash.Resource,
|
|
data_layer: AshCsv.DataLayer
|
|
|
|
csv do
|
|
create? true
|
|
columns [:id, :title]
|
|
file "test/data_files/comments.csv"
|
|
end
|
|
|
|
actions do
|
|
read(:read)
|
|
create(:create)
|
|
end
|
|
|
|
attributes do
|
|
uuid_primary_key :id
|
|
attribute(:title, :string)
|
|
end
|
|
|
|
relationships do
|
|
belongs_to(:post, AshCsv.Test.Post)
|
|
end
|
|
end
|