My space on the web https://inhji.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
360 B

defmodule Mirage.Notes.NoteNote do
use Ecto.Schema
import Ecto.Changeset
alias Mirage.Notes.Note
schema "notes_notes" do
belongs_to :source, Note
belongs_to :target, Note
end
@attrs [:source, :target]
@doc false
def changeset(note_topic, attrs) do
note_topic
|> cast(attrs, @attrs)
|> validate_required(@attrs)
end
end