Sha256: 07b2407c4a749ed4ab451fa1f3af05a516439ad9bcb77b0ad0057552317b1360
Contents?: true
Size: 1.74 KB
Versions: 2
Compression:
Stored size: 1.74 KB
Contents
# Unidom Contact 联系方式领域模型引擎 [](http://opensource.org/licenses/MIT) [](https://badge.fury.io/rb/unidom-contact) Unidom (UNIfied Domain Object Model) is a series of domain model engines. The Contact domain model engine includes Contact Subscription and Email Address models. Unidom (统一领域对象模型)是一系列的领域模型引擎。联系方式领域模型引擎包括联系方式订阅和电子邮箱地址的模型。 ## Recent Update Check out the [Road Map](ROADMAP.md) to find out what's the next. Check out the [Change Log](CHANGELOG.md) to find out what's new. ## Usage in Gemfile ```ruby gem 'unidom-contact' ``` ## Run the Database Migration ```shell rake db:migrate ``` The migration versions start with 200103. ## Call the Model ```ruby contact = Unidom::Contact::China::MobilePhoneNumber.phone_number_is('13912345678').valid_at.alive.first_or_create! subscriber = Unidom::Party::Person.create! name: 'John' subscription = Unidom::Contact::ContactSubscription.subscribe! contact: contact, subscriber: subscriber, name: 'John Mobile', primary: true, grade: 0, priority: 0, opened_at: Time.now # or subscription = Unidom::Contact::ContactSubscription.subscribe! contact: contact, subscriber: subscriber # Associate the subscriber & the contact Unidom::Contact::ContactSubscription.subscribed_by(subscriber).valid_at.alive # Get a list of all contact subscriptions of subscriber Unidom::Contact::ContactSubscription.contact_is(contact).valid_at.alive # Get a list of all contact subscriptions of contact Unidom::Contact::EmailAddress.full_address_is('topbit.du@gmail.com').first # Find the Email Address ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
unidom-contact-1.0.1 | README.md |
unidom-contact-1.0 | README.md |