2021-08-23 10:59:12 +00:00
|
|
|
defmodule MatrixServer.JoinedRoom do
|
|
|
|
use Ecto.Schema
|
|
|
|
|
|
|
|
alias MatrixServer.{Account, Room}
|
|
|
|
|
2021-08-24 23:27:03 +00:00
|
|
|
@type t :: %__MODULE__{
|
2021-08-30 20:36:01 +00:00
|
|
|
account_id: integer(),
|
2021-08-24 23:27:03 +00:00
|
|
|
room_id: String.t()
|
|
|
|
}
|
|
|
|
|
2021-08-23 10:59:12 +00:00
|
|
|
@primary_key false
|
|
|
|
schema "joined_rooms" do
|
2021-08-30 20:36:01 +00:00
|
|
|
belongs_to :account, Account, primary_key: true
|
2021-08-23 10:59:12 +00:00
|
|
|
|
|
|
|
belongs_to :room, Room, primary_key: true, type: :string
|
|
|
|
end
|
|
|
|
end
|