Sha256: 26e0c55408139380fa2aaa995f6c3660d5b094e8f8705d6ad058f20b7079fc8a
Contents?: true
Size: 409 Bytes
Versions: 2
Compression:
Stored size: 409 Bytes
Contents
module EducodeSales class Teacher < ApplicationRecord has_many :activity_teachers has_many :activities, through: :activity_teachers belongs_to :department, optional: true belongs_to :staff belongs_to :user, optional: true belongs_to :follow_up, counter_cache: true, optional: true validates :user_id, uniqueness: { allow_blank: true, message: '已存在老师列表'} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
educode_sales-0.1.1 | app/models/educode_sales/teacher.rb |
educode_sales-0.1.0 | app/models/educode_sales/teacher.rb |