mirror of
https://github.com/algora-io/tv.git
synced 2025-03-27 20:20:18 +02:00
19 lines
310 B
Elixir
19 lines
310 B
Elixir
|
defmodule Algora.Ads.Visit do
|
||
|
use Ecto.Schema
|
||
|
import Ecto.Changeset
|
||
|
|
||
|
schema "ad_visits" do
|
||
|
field :ad_id, :id
|
||
|
field :video_id, :id
|
||
|
|
||
|
timestamps()
|
||
|
end
|
||
|
|
||
|
@doc false
|
||
|
def changeset(visit, attrs) do
|
||
|
visit
|
||
|
|> cast(attrs, [:ad_id, :video_id])
|
||
|
|> validate_required([:ad_id])
|
||
|
end
|
||
|
end
|