Files
andros bdd181425b Initial commit: Django LiveView vs Phoenix LiveView benchmark
Docker Compose project with automated Playwright benchmarks comparing
django-liveview 2.2.0 against Phoenix LiveView 1.0 across 6 scenarios.
2026-05-15 15:46:50 +02:00

20 lines
454 B
Elixir

defmodule Benchmark.Alert do
use Ecto.Schema
import Ecto.Changeset
schema "alerts" do
field :alert_type, :string, default: "INFO"
field :description, :string
timestamps(type: :utc_datetime)
end
@types ~w(INFO WARNING CRITICAL)
def changeset(alert, attrs) do
alert
|> cast(attrs, [:alert_type, :description])
|> validate_required([:alert_type, :description])
|> validate_inclusion(:alert_type, @types)
end
end