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
360 B

defmodule Mirage.Notes.NoteLink do
use Ecto.Schema
import Ecto.Changeset
schema "notes_links" do
field :title, :string
field :url, :string
belongs_to :note, Mirage.Notes.Note
timestamps()
end
@doc false
def changeset(link, attrs) do
link
|> cast(attrs, [:title, :url])
|> validate_required([:title, :url])
end
end