create gists

This commit is contained in:
zack 2024-10-26 15:01:33 -04:00
parent 79a17290d5
commit 43a8412f06
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
90 changed files with 1777 additions and 2107 deletions

View file

@ -0,0 +1,18 @@
defmodule Zoeyscomputer.Gists.Gist do
use Ecto.Schema
import Ecto.Changeset
schema "gists" do
field :code, :string
field :lang, :string
timestamps(type: :utc_datetime)
end
@doc false
def changeset(gist, attrs) do
gist
|> cast(attrs, [:code, :lang])
|> validate_required([:code, :lang])
end
end