Add working implementation of state resolution
Add some database seeds
This commit is contained in:
parent
2d34f78a0b
commit
8a2ef0d079
7 changed files with 848 additions and 410 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue