Sha256: 8435cc8beed44dbcba24fc27bf0887d654dfeeacea2bab9a31b82655813f7c80

Contents?: true

Size: 720 Bytes

Versions: 1

Compression:

Stored size: 720 Bytes

Contents

module EducodeSales
  class FollowUp < ApplicationRecord
    # todo O类商机特有字段-部署类型(因此不写入common表中)
    BUSINESS_DEPLOYMENT =[
      ["公有云", 1],
      ["私有云", 2],
      ["混合云", 3]
    ]

    include ::Deletable
    belongs_to :business, counter_cache: true # counter_cache(自动计算 business对应follow_up表中对应的个数)
    belongs_to :place, optional: true
    has_many :money_plans
    has_many :key_person
    has_many :teachers, through: :key_person
    has_many :assign_follow_ups
    belongs_to :staff
    belongs_to :stage, class_name: 'Common'
    belongs_to :clazz, class_name: 'Common'


    default_scope  -> {where(deleted_at: nil)}


  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
educode_sales-0.8.3 app/models/educode_sales/follow_up.rb