|
|
|
@@ -2,24 +2,27 @@ |
|
|
|
# |
|
|
|
# Table name: forge_applied_projects |
|
|
|
# |
|
|
|
# id :integer not null, primary key |
|
|
|
# project_id :integer |
|
|
|
# user_id :integer |
|
|
|
# role :integer default("0") |
|
|
|
# status :integer default("0") |
|
|
|
# created_at :datetime not null |
|
|
|
# updated_at :datetime not null |
|
|
|
# id :integer not null, primary key |
|
|
|
# project_id :integer |
|
|
|
# user_id :integer |
|
|
|
# role :integer default("0") |
|
|
|
# status :integer default("0") |
|
|
|
# created_at :datetime not null |
|
|
|
# updated_at :datetime not null |
|
|
|
# project_invite_link_id :integer |
|
|
|
# |
|
|
|
# Indexes |
|
|
|
# |
|
|
|
# index_forge_applied_projects_on_project_id (project_id) |
|
|
|
# index_forge_applied_projects_on_user_id (user_id) |
|
|
|
# index_forge_applied_projects_on_project_id (project_id) |
|
|
|
# index_forge_applied_projects_on_project_invite_link_id (project_invite_link_id) |
|
|
|
# index_forge_applied_projects_on_user_id (user_id) |
|
|
|
# |
|
|
|
|
|
|
|
class AppliedProject < ApplicationRecord |
|
|
|
self.table_name = "forge_applied_projects" |
|
|
|
belongs_to :user |
|
|
|
belongs_to :project |
|
|
|
belongs_to :project_invite_link, optional: true |
|
|
|
|
|
|
|
has_many :applied_messages, as: :applied, dependent: :destroy |
|
|
|
# has_many :forge_activities, as: :forge_act, dependent: :destroy |
|
|
|
|