Class: Unidom::Action::Acting
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Unidom::Action::Acting
- Includes:
- ProgneTapera::EnumCode, Concerns::AsCaused, Common::Concerns::ModelExtension
- Defined in:
- app/models/unidom/action/acting.rb
Overview
Acting 是行为记录。 #reason 是原因。 #acted 是被操作的对象。 #action_code 是行为代码,C: create, R: read, U: update, D: destroy。
Class Method Summary collapse
Class Method Details
.act!(it, from: nil, thru: nil, due_to: nil, by: nil, via: nil, at: Time.now, action_code: 'C') ⇒ Object
27 28 29 |
# File 'app/models/unidom/action/acting.rb', line 27 def self.act!(it, from: nil, thru: nil, due_to: nil, by: nil, via: nil, at: Time.now, action_code: 'C') create! from_value: from, thru_value: thru, actor_visitor: via, actor_party: by, acted: it, reason: due_to, action_code: action_code, opened_at: at end |