513 B · text History 6280797
defmodule GitGud.Syms.RepositorySym do
@moduledoc """
One user's mark of one symbol on one repository.
A user may mark the same repo with several different symbols; the
unique index is on the triple, not on (user, repo).
"""
use Ecto.Schema
alias GitGud.Accounts.User
alias GitGud.Repositories.Repository
schema "repository_syms" do
field :symbol, :string
belongs_to :user, User
belongs_to :repository, Repository
timestamps(type: :utc_datetime, updated_at: false)
end
end