architex/lib/matrix_server/schema/joined_room.ex
Pim Kunis bcc6cbb24b Implement client invite endpoint
Refactor room server to automatically determine auth events
Add documentation in various places
2021-08-25 01:27:03 +02:00

21 lines
454 B
Elixir

defmodule MatrixServer.JoinedRoom do
use Ecto.Schema
alias MatrixServer.{Account, Room}
@type t :: %__MODULE__{
localpart: String.t(),
room_id: String.t()
}
@primary_key false
schema "joined_rooms" do
belongs_to :account, Account,
foreign_key: :localpart,
references: :localpart,
type: :string,
primary_key: true
belongs_to :room, Room, primary_key: true, type: :string
end
end