Sha256: 566c4f723819cf88bc1a0c8aadd6a2d26e462c451335d48cebb482e98cbfd7b7

Contents?: true

Size: 1.37 KB

Versions: 79

Compression:

Stored size: 1.37 KB

Contents

class AddPlanSignedDateToFollowUps < ActiveRecord::Migration[5.2]
  def change
    add_column :educode_sales_follow_ups, :plan_signed_date, :date, comment: '计划签单时间'
    add_column :educode_sales_follow_ups, :bidded_days, :integer, comment: '签单中标后天数'
    add_column :educode_sales_follow_ups, :service_years, :integer, comment: '服务期验收后年数'
    add_column :educode_sales_follow_ups, :signed_department_id, :integer, comment: '签约单位'
    add_column :educode_sales_follow_ups, :signed_clazz, :integer, comment: '签约类型'
    add_column :educode_sales_follow_ups, :info_clazz, :integer, comment: '信息类型'
    add_column :educode_sales_follow_ups, :contract_name, :string, comment: '合同名称'
    add_column :educode_sales_follow_ups, :funding_source, :integer, comment: '资金来源'
    
    EducodeSales::Permission.find_or_create_by(name: '查看数据', subject: 'Business', action: 'read_contract', clazz: 'contract')
    EducodeSales::Permission.find_or_create_by(name: '添加跟进记录', subject: 'Business', action: 'add_contract_follow', clazz: 'contract')
    EducodeSales::Permission.find_or_create_by(name: '指派售后', subject: 'Business', action: 'assign_contract', clazz: 'contract')
    EducodeSales::Role.all.each do |r|
      a = r.role_areas.find_or_initialize_by(clazz: 'Contract')
      a.save
    end
    
  end
end

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
educode_sales-1.10.74 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.73 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.72 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.71 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.70 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.59 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.58 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.49 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.48 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.46 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.41 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.37 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.36 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.35 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.34 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.33 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.31 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.30 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.29 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb
educode_sales-1.10.28 db/migrate/20230430023424_add_plan_signed_date_to_follow_ups.rb