Sha256: a75ab4b8eaaa99b7be7241e5cbb4cb666b2dbab0a77d425e223a128372ecd883

Contents?: true

Size: 813 Bytes

Versions: 33

Compression:

Stored size: 813 Bytes

Contents

##
## 2023-09-13 _vp_ I don't know if it's even used.
##
class Office::Action
  include Mongoid::Document
  include Mongoid::Timestamps
  store_in collection: 'office_actions'

  field     :slug, type: :string
  validates :slug, uniqueness: true, allow_nil: true

  field :descr, type: :string ## optional


  STATE_ACTIVE   = 'active'
  STATE_INACTIVE = 'inactive'
  STATES         = [ STATE_ACTIVE, STATE_INACTIVE ]
  field :state, type: :string
  scope :active, ->{ where( state: STATE_ACTIVE ) }


  has_many :ties,      class_name: '::Office::ActionTie', inverse_of: :office_action
  has_many :prev_ties, class_name: '::Office::ActionTie', inverse_of: :next_office_action
  accepts_nested_attributes_for :ties

  field :action_exe, type: :string

  field :perform_at, type: :time

end
OAct = Office::Action

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
ish_models-3.0.0.1 lib/office/action.rb
ish_models-0.0.33.304 lib/office/action.rb
ish_models-0.0.33.303 lib/office/action.rb
ish_models-0.0.33.302 lib/office/action.rb
ish_models-0.0.33.301 lib/office/action.rb
ish_models-0.0.33.300 lib/office/action.rb
ish_models-0.0.33.299 lib/office/action.rb
ish_models-0.0.33.298 lib/office/action.rb
ish_models-0.0.33.297 lib/office/action.rb
ish_models-0.0.33.296 lib/office/action.rb
ish_models-0.0.33.295 lib/office/action.rb
ish_models-0.0.33.294 lib/office/action.rb
ish_models-0.0.33.293 lib/office/action.rb
ish_models-0.0.33.292 lib/office/action.rb
ish_models-0.0.33.291 lib/office/action.rb
ish_models-0.0.33.287 lib/office/action.rb
ish_models-0.0.33.286 lib/office/action.rb
ish_models-0.0.33.285 lib/office/action.rb
ish_models-0.0.33.284 lib/office/action.rb
ish_models-0.0.33.283 lib/office/action.rb