update table waitlist and passed_waitlist

This commit is contained in:
wyx 2020-07-25 10:57:45 +08:00
parent 769bf2b90e
commit c546eda537
3 changed files with 13 additions and 2 deletions

View File

@ -92,6 +92,15 @@ class User < ApplicationRecord
# has_many :libraries, 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
scope :active, lambda { where(status: STATUS_ACTIVE) }
scope :like, lambda { |keywords|

View File

@ -1,8 +1,10 @@
class CreateWaitlists < ActiveRecord::Migration[5.2]
def change
create_table :waitlists do |t|
t.integer :applicant_id
t.integer :reviewer_id
t.string :applicant_id
t.string :integer
t.string :reviewer_id
t.string :integer
t.timestamps
end