memberlog/app/models/dayoff.rb

16 lines
357 B
Ruby
Raw Normal View History

2017-02-13 17:27:57 +00:00
class Dayoff < PersonalPluginIntro
include Mongoid::Document
include Mongoid::Timestamps
2017-02-21 10:21:35 +00:00
belongs_to :member_log, :dependent => :destroy
2017-02-13 17:27:57 +00:00
field :dayoff_description, localize: true
field :start_dayoff, :type => DateTime
field :end_dayoff, :type => DateTime
2017-02-22 06:36:08 +00:00
validates :start_dayoff, :presence => true
validates :end_dayoff, :presence => true
2017-02-13 17:27:57 +00:00
end