init push - laying out the project
This commit is contained in:
22
portal/app/models/tip_source.rb
Normal file
22
portal/app/models/tip_source.rb
Normal file
@ -0,0 +1,22 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: tip_sources
|
||||
#
|
||||
# id :uuid not null, primary key
|
||||
# tipster_account_id :string
|
||||
# description :string
|
||||
# source_type :string
|
||||
# active :boolean default(FALSE)
|
||||
# filters :jsonb
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class TipSource < ApplicationRecord
|
||||
belongs_to :tipster_account, dependent: :delete
|
||||
has_many :source_subscriptions, dependent: :delete_all
|
||||
has_many :tip_source_data, class_name: 'TipSourceData'
|
||||
has_many :subscription_runs, through: :source_subscriptions
|
||||
|
||||
scope :active_sources, -> { where(active: true)}
|
||||
|
||||
end
|
Reference in New Issue
Block a user