2018-01-01 13:52:15 +00:00
|
|
|
class EmployeeExperience
|
|
|
|
include Mongoid::Document
|
|
|
|
include Mongoid::Timestamps
|
|
|
|
|
|
|
|
field :company_name, localize: true
|
|
|
|
field :job_title, localize: true
|
|
|
|
field :responsibilities, localize: true
|
|
|
|
field :start_date, type: DateTime
|
|
|
|
field :end_date, type: DateTime
|
|
|
|
|
|
|
|
belongs_to :employee_profile
|
|
|
|
|
2018-01-12 08:43:26 +00:00
|
|
|
def period
|
|
|
|
if !self.end_date.nil?
|
|
|
|
period = self.start_date.strftime("%Y/%m/%d") + " ~ " + self.end_date.strftime("%Y/%m/%d")
|
|
|
|
else
|
|
|
|
period = self.start_date.strftime("%Y/%m/%d") + " ~ current"
|
|
|
|
end
|
|
|
|
period
|
|
|
|
end
|
|
|
|
|
2018-01-01 13:52:15 +00:00
|
|
|
end
|