Sha256: f4a87c8d3fb1a04aaad5ff325230832d6c302bc51139b91e0615f90b304d3ae7
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
# Unidom Visitor 访问者领域模型引擎 [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT) [![Gem Version](https://badge.fury.io/rb/unidom-visitor.svg)](https://badge.fury.io/rb/unidom-visitor) Unidom (UNIfied Domain Object Model) is a series of domain model engines. The Visitor domain model engine includes User, Guest, Administrator, and Password models. Unidom (统一领域对象模型)是一系列的领域模型引擎。访问者领域模型引擎包括用户、游客、管理员和密码的模型。 ## Usage in Gemfile ```ruby gem 'unidom-visitor' ``` ## Run the Database Migration ```shell rake db:migrate ``` ## Call the Model ```ruby phone = PhoneNumberIdentity.create phone_number: '13912345678' Unidom::Visitor::User.sign_up phone, 'password', now: Time.now # Sign up a user with given phone number and password Unidom::Visitor::Guest.valid_at.alive.first # Get the first guest if Unidom::Visitor::User.valid_at.alive.first.passwords.valid_at.alive.first.merge(Unidom::Visitor::Authenticating.valid_at.alive).first.matched? 'password' # Sign in end ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unidom-visitor-0.3 | README.md |