update table waitlist and passed_waitlist
This commit is contained in:
parent
769bf2b90e
commit
c546eda537
|
@ -92,6 +92,15 @@ class User < ApplicationRecord
|
||||||
# has_many :libraries, dependent: :destroy
|
# has_many :libraries, dependent: :destroy
|
||||||
has_many :project_trends, dependent: :destroy
|
has_many :project_trends, dependent: :destroy
|
||||||
|
|
||||||
|
# sponsor
|
||||||
|
has_many :as_sponsors, class_name: 'Sponsorship', foreign_key: 'sponsor_id', dependent: :destroy
|
||||||
|
has_many :as_sponsored, class_name: 'Sponsorship', foreign_key: 'developer_id', dependent: :destroy
|
||||||
|
has_many :stopped_sponsors, class_name: 'StoppedSponsorship', foreign_key: 'sponsor_id', dependent: :destroy
|
||||||
|
has_many :stopped_sponsored, class_name: 'StoppedSponsorship', foreign_key: 'developer_id', dependent: :destroy
|
||||||
|
has_many :sponsor_tier, dependent: :destroy
|
||||||
|
has_one :wallet, dependent: :destroy
|
||||||
|
# has_many :waitlist
|
||||||
|
|
||||||
# Groups and active users
|
# Groups and active users
|
||||||
scope :active, lambda { where(status: STATUS_ACTIVE) }
|
scope :active, lambda { where(status: STATUS_ACTIVE) }
|
||||||
scope :like, lambda { |keywords|
|
scope :like, lambda { |keywords|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
class CreateWaitlists < ActiveRecord::Migration[5.2]
|
class CreateWaitlists < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
create_table :waitlists do |t|
|
create_table :waitlists do |t|
|
||||||
t.integer :applicant_id
|
t.string :applicant_id
|
||||||
t.integer :reviewer_id
|
t.string :integer
|
||||||
|
t.string :reviewer_id
|
||||||
|
t.string :integer
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
Loading…
Reference in New Issue