init: inital commit

This commit is contained in:
2026-04-16 15:46:00 +02:00
commit 34ddbe669e
40 changed files with 1556 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
defmodule Localiser.Domain.Schema.Floor do
use Ecto.Schema
import Ecto.Changeset
alias Localiser.Domain.Schema.Room
schema "floors" do
field :name, :string
has_many :rooms, Room
timestamps(type: :utc_datetime)
end
@doc false
def changeset(floor, attrs) do
floor
|> cast(attrs, [:name])
|> validate_required([:name])
end
end