semester_process_volunteer.rb 829 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
class SemesterProcessVolunteer < ApplicationRecord
  belongs_to :volunteer
  belongs_to :semester_process
  belongs_to :responsible, -> { with_deleted }, class_name: 'User',
    inverse_of: 'semester_processes', optional: true
  belongs_to :reviewed_by, -> { with_deleted }, class_name: 'User',
    inverse_of: 'semester_processes', optional: true
  belongs_to :commited_by, -> { with_deleted }, class_name: 'User',
    inverse_of: 'semester_processes', optional: true

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
11
  has_many :semester_process_volunteer_missions, dependent: :destroy
12
  has_many :semester_feedbacks, dependent: :destroy
13
  has_many :hours, dependent: :nullify
14
15
16
17

  has_many :semester_process_mails, dependent: :destroy
  has_many :mails, -> { mail }, through: :semester_process_mails
  has_many :reminders, -> { reminder }, through: :semester_process_mails
18
end