You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/partner.rb

11 lines
386 B

class Partner < ApplicationRecord
belongs_to :school, optional: true
5 years ago
has_many :partner_customers, dependent: :destroy
has_many :customers, through: :partner_customers
5 years ago
has_many :partner_manager_groups, dependent: :destroy
has_one :admin_partner_manager_group, -> { where(admin: true) }, class_name: 'PartnerManagerGroup'
has_many :partner_managers, dependent: :destroy
end