Sha256: 98d97492b018669daabace74526f45cccf5c9089b23481e3e18926ddce914a28
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
module EducodeSales class Activity < ApplicationRecord belongs_to :staff has_many :activity_teachers, dependent: :destroy has_many :teachers, through: :activity_teachers, dependent: :restrict_with_exception has_many :manages, -> {where("educode_sales_activity_staffs.clazz_id = 0")}, dependent: :destroy, class_name: 'ActivityStaff' has_many :assists, -> {where("educode_sales_activity_staffs.clazz_id = 1")}, dependent: :destroy, class_name: 'ActivityStaff' has_many :experts , -> {where("educode_sales_activity_staffs.clazz_id = 2")}, dependent: :destroy, class_name: 'ActivityStaff' has_many :invitations , -> {where("educode_sales_activity_staffs.clazz_id = 3")}, dependent: :destroy, class_name: 'ActivityStaff' has_many :activity_staffs, dependent: :destroy has_many :activity_follow_ups, dependent: :destroy belongs_to :sales, class_name: 'Staff', optional: true has_one :attachment, as: :container, dependent: :destroy enum clazz_id: ['全国会议', '区域会议', '单校会议', '国赛', '省赛', '夏令营'] enum state_id: { '策划中': 1, '筹备中': 2, '实施中': 3, '已结束': 4, '已撤销': 5, '已推迟': 6 } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
educode_sales-0.9.67 | app/models/educode_sales/activity.rb |