Sha256: 26dc556b73fffada1733b0560012312f9d95d9e676f1b23658fe330401e94588

Contents?: true

Size: 494 Bytes

Versions: 5

Compression:

Stored size: 494 Bytes

Contents

require 'mongoid'

module TransactionEventStoreMongoid
  class TransactionEvent
    include ::Mongoid::Document

    field :event_id, type: String
    field :event_type, type: String
    field :meta, type: Hash, default: {}
    field :data, type: Hash, default: {}
    field :snapshot, type: Boolean, default: false

    field :ts, type: BSON::Timestamp, default: -> { BSON::Timestamp.new(0, 0) }
    embedded_in :transaction, class_name: 'TransactionEventStoreMongoid::Transaction'

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
transaction_event_store_mongoid-1.0.2 lib/transaction_event_store_mongoid/transaction_event.rb
transaction_event_store_mongoid-1.0.1 lib/transaction_event_store_mongoid/transaction_event.rb
transaction_event_store_mongoid-1.0.0 lib/transaction_event_store_mongoid/transaction_event.rb
transaction_event_store_mongoid-1.0.0.pre.1 lib/transaction_event_store_mongoid/transaction_event.rb
transaction_event_store_mongoid-0.0.1 lib/transaction_event_store_mongoid/transaction_event.rb