mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-04-01 09:15:28 +02:00
18 lines
390 B
Elixir
18 lines
390 B
Elixir
defmodule Philomena.Galleries.Interaction do
|
|
use Ecto.Schema
|
|
import Ecto.Changeset
|
|
|
|
schema "gallery_interactions" do
|
|
belongs_to :gallery, Philomena.Galleries.Gallery
|
|
belongs_to :image, Philomena.Images.Image
|
|
|
|
field :position, :integer
|
|
end
|
|
|
|
@doc false
|
|
def changeset(interaction, attrs) do
|
|
interaction
|
|
|> cast(attrs, [])
|
|
|> validate_required([])
|
|
end
|
|
end
|