CJ_Clippy 80e9fbb13d
Some checks failed
ci / build (push) Failing after 11m33s
ci / Tests & Checks (push) Failing after 6m55s
XPost Categorization and acceptance progress
2025-03-14 21:22:12 -08:00

23 lines
474 B
Elixir

defmodule Bright.Platforms.Platform do
use Ecto.Schema
import Ecto.Changeset
schema "platforms" do
field :name, :string
field :slug, :string
field :url, :string
field :nsfw, :boolean
has_many :platform_aliases, Bright.Platforms.PlatformAlias
timestamps(type: :utc_datetime)
end
@doc false
def changeset(platform, attrs) do
platform
|> cast(attrs, [:name, :url, :slug])
|> validate_required([:name, :url, :slug])
end
end