Initial commit

This commit is contained in:
2022-05-23 15:57:15 +02:00
commit 5608d2e5ec
99 changed files with 5636 additions and 0 deletions

View File

@ -0,0 +1,18 @@
defmodule SomethingErlang.Forums.Thread do
use Ecto.Schema
import Ecto.Changeset
schema "threads" do
field :thread_id, :integer
field :title, :string
timestamps()
end
@doc false
def changeset(thread, attrs) do
thread
|> cast(attrs, [:title, :thread_id])
|> validate_required([:title, :thread_id])
end
end