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-0.0.33.282 lib/office/action.rb
ish_models-0.0.33.281 lib/office/action.rb
ish_models-0.0.33.280 lib/office/action.rb
ish_models-0.0.33.279 lib/office/action.rb
ish_models-0.0.33.278 lib/office/action.rb
ish_models-0.0.33.277 lib/office/action.rb
ish_models-0.0.33.276 lib/office/action.rb
ish_models-0.0.33.275 lib/office/action.rb
ish_models-0.0.33.274 lib/office/action.rb
ish_models-0.0.33.273 lib/office/action.rb
ish_models-0.0.33.272 lib/office/action.rb
ish_models-0.0.33.271 lib/office/action.rb
ish_models-0.0.33.270 lib/office/action.rb