Add membership table
This commit is contained in:
parent
a682f1c7ad
commit
46b4199618
4 changed files with 63 additions and 6 deletions
18
lib/architex/schema/membership.ex
Normal file
18
lib/architex/schema/membership.ex
Normal file
|
@ -0,0 +1,18 @@
|
|||
defmodule Architex.Membership do
|
||||
use Ecto.Schema
|
||||
|
||||
alias Architex.{Account, Room}
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
account_id: integer(),
|
||||
room_id: String.t(),
|
||||
membership: String.t()
|
||||
}
|
||||
|
||||
@primary_key false
|
||||
schema "membership" do
|
||||
belongs_to :account, Account, primary_key: true
|
||||
belongs_to :room, Room, primary_key: true, type: :string
|
||||
field :membership, :string
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue