blob: 73ef1ea5188adfc9d85516fcafa0bbe05e858941 (
plain) (
tree)
|
|
defmodule MatrixAppService.Bridge.Room do
use Ecto.Schema
import Ecto.Changeset
schema "rooms" do
field(:data, :map)
field(:local_id, :string)
field(:remote_id, :string)
timestamps()
end
@doc false
def changeset(room, attrs) do
room
|> cast(attrs, [:local_id, :remote_id, :data])
# |> validate_required([:local_id, :remote_id, :data])
|> unique_constraint(:local_id)
|> unique_constraint(:remote_id)
end
end
|