Add working implementation of state resolution

Add some database seeds
This commit is contained in:
Pim Kunis 2021-07-23 21:00:01 +02:00
parent 2d34f78a0b
commit 8a2ef0d079
7 changed files with 848 additions and 410 deletions

View file

@ -3,12 +3,13 @@ defmodule MatrixServer.Room do
import Ecto.Changeset
alias __MODULE__
alias MatrixServer.{Room, Event}
alias MatrixServerWeb.API.CreateRoom
@primary_key {:id, :string, []}
schema "rooms" do
field :visibility, Ecto.Enum, values: [:public, :private]
has_many :events, Event, foreign_key: :event_id
end
def changeset(room, params \\ %{}) do