lib/doorkeeper/orm/mongoid4/access_grant.rb in doorkeeper-mongodb-3.0.0 vs lib/doorkeeper/orm/mongoid4/access_grant.rb in doorkeeper-mongodb-4.0.0

- old
+ new

@@ -1,24 +1,21 @@ -require 'doorkeeper/orm/mongoid4/concerns/scopes' -require 'doorkeeper-mongodb/compatible' - module Doorkeeper class AccessGrant - include DoorkeeperMongodb::Compatible - include Mongoid::Document include Mongoid::Timestamps - include AccessGrantMixin - include Models::Mongoid4::Scopes + include DoorkeeperMongodb::Compatible - self.store_in collection: :oauth_access_grants + include DoorkeeperMongodb::Shared::Scopes + include DoorkeeperMongodb::Mixins::Mongoid::AccessGrantMixin + store_in collection: :oauth_access_grants + field :resource_owner_id, type: BSON::ObjectId field :token, type: String field :expires_in, type: Integer field :redirect_uri, type: String field :revoked_at, type: DateTime - index({ token: 1 }, { unique: true }) + index({ token: 1 }, unique: true) end end