README.md in unidom-action-0.1 vs README.md in unidom-action-0.2
- old
+ new
@@ -1,8 +1,9 @@
-# Unidom Action 支付领域模型引擎
+# Unidom Action 审计领域模型引擎
[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
+[![Gem Version](https://badge.fury.io/rb/unidom-action.svg)](https://badge.fury.io/rb/unidom-action)
Unidom (UNIfied Domain Object Model) is a series of domain model engines. The Action domain model engine includes the Reason, State Transition, Obsolescene, and the Acting models.
Unidom (统一领域对象模型)是一系列的领域模型引擎。审计领域模型引擎包括原因、状态迁移、废弃和行为日志的模型。
## Recent Update
@@ -23,9 +24,12 @@
## Call the Model
```ruby
reason = Unidom::Action::Reason.create! activity_code: 'SRRR', name: 'broken', description: 'The box was broken.'
# SRRR = Shipment Receipt Rejection Reason
+user = Unidom::Visitor::User.create!
person = Unidom::Party::Person.create! name: 'Tim'
-transition = Unidom::Action::StateTransition.create! reason: reason, subject: person, from_state: 'C', thru_state: 'R'
+transition = Unidom::Action::StateTransition.create! transitor_visitor: user, transitor_party: person, reason: reason, subject: person, from_state: 'C', thru_state: 'R'
+obsolescence = Unidom::Action::Obsolescence.create! obsolescer_visitor: user, obsolescer_party: person, reason: reason, obsolesced: person
+# The reason could be nil.
```