mirror of
https://github.com/ClaperCo/Claper.git
synced 2026-02-24 20:19:48 +01:00
20 lines
441 B
Elixir
20 lines
441 B
Elixir
defmodule Lti13.Deployments.Deployment do
|
|
use Ecto.Schema
|
|
import Ecto.Changeset
|
|
|
|
schema "lti_13_deployments" do
|
|
field :deployment_id, :integer
|
|
|
|
belongs_to :registration, Lti13.Registrations.Registration
|
|
|
|
timestamps()
|
|
end
|
|
|
|
@doc false
|
|
def changeset(deployment, attrs \\ %{}) do
|
|
deployment
|
|
|> cast(attrs, [:deployment_id, :registration_id])
|
|
|> validate_required([:deployment_id, :registration_id])
|
|
end
|
|
end
|