526 B · text History e569b6d
defmodule CartosnapApp.Trips.TripMember do
  @moduledoc """
  Someone other than its owner who belongs to a trip: they see its album
  and file their own photos under it. Made by accepting an invite
  (`CartosnapApp.Trips.accept_invite/2`).
  """

  use Ecto.Schema

  @primary_key {:id, :binary_id, autogenerate: true}
  @foreign_key_type :binary_id
  schema "photo_trip_members" do
    belongs_to :trip, CartosnapApp.Trips.Trip
    belongs_to :user, CartosnapApp.Accounts.User

    timestamps(type: :utc_datetime)
  end
end