memberlog/app/models/member_log.rb

19 lines
546 B
Ruby
Raw Normal View History

2017-02-13 17:27:57 +00:00
class MemberLog
2020-01-20 02:35:01 +00:00
include Mongoid::Document
include Mongoid::Timestamps
2017-02-13 17:27:57 +00:00
include MemberHelper
include Slug
2020-01-20 02:35:01 +00:00
field :todo, as: :slug_title, type: String, localize: true
2017-02-13 17:27:57 +00:00
field :complete, localize: true
field :excuse, localize: true
field :finish, :type => Boolean, :default => false
field :checkout, :type => DateTime
2017-02-22 11:00:53 +00:00
field :dayoff, :type => Boolean, :default => false
2017-02-13 17:27:57 +00:00
2020-01-20 02:35:01 +00:00
belongs_to :member_profile
2017-02-13 17:27:57 +00:00
has_many :dayoffs
2020-01-20 02:35:01 +00:00
def self.get_plugin_datas_to_member(datas)
page = Page.where(:module => "member_log").first rescue nil
2017-02-13 17:27:57 +00:00
end