2018-01-01 13:52:15 +00:00
|
|
|
class EmployeeJobApplication
|
|
|
|
include Mongoid::Document
|
|
|
|
include Mongoid::Timestamps
|
|
|
|
|
|
|
|
field :job
|
2018-01-02 18:30:32 +00:00
|
|
|
field :cover_letter
|
|
|
|
field :archived, type: Boolean, :default => false
|
2018-01-01 13:52:15 +00:00
|
|
|
|
|
|
|
belongs_to :employee_profile
|
|
|
|
|
2018-01-02 18:30:32 +00:00
|
|
|
scope :not_archived, ->{ where(:archived => false) }
|
|
|
|
|
2018-01-01 13:52:15 +00:00
|
|
|
def get_job
|
|
|
|
RecruitmentJob.find(self.job) rescue nil
|
|
|
|
end
|
|
|
|
end
|