24 lines
574 B
Ruby
24 lines
574 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: pinned_projects
|
|
#
|
|
# id :integer not null, primary key
|
|
# user_id :integer
|
|
# project_id :integer
|
|
# position :integer default("0")
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_pinned_projects_on_project_id (project_id)
|
|
# index_pinned_projects_on_user_id (user_id)
|
|
#
|
|
|
|
class PinnedProject < ApplicationRecord
|
|
|
|
# belongs_to :user
|
|
belongs_to :owner, class_name: 'Owner', foreign_key: :user_id, optional: true
|
|
belongs_to :project
|
|
end
|