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.
 
 
 
 
 

20 lines
382 B

defmodule Mirage.Notes.NoteLink do
use Ecto.Schema
import Ecto.Changeset
alias Mirage.Notes.Note
alias Mirage.Links.Link
schema "notes_links" do
belongs_to :note, Note
belongs_to :link, Link
end
@attrs [:note_id, :link_id]
@doc false
def changeset(note_link, attrs) do
note_link
|> cast(attrs, @attrs)
|> validate_required(@attrs)
end
end