Sha256: 042a80b2e5003eb83cdd2880858db76e223e237831c9d125e565206a109a43f5

Contents?: true

Size: 900 Bytes

Versions: 5

Compression:

Stored size: 900 Bytes

Contents

# frozen_string_literal: true
require 'couchbase-orm/base'

class DocWithoutTimestamps < CouchbaseOrm::Base
  attribute :title
end

class DocWithCreatedAt < CouchbaseOrm::Base
  attribute :title
  attribute :created_at, :datetime
end

class DocWithUpdatedAt < CouchbaseOrm::Base
  attribute :title
  attribute :updated_at, :datetime
end

class DocWithBothTimestampsAttributes < CouchbaseOrm::Base
  attribute :title
  attribute :created_at, :datetime
  attribute :updated_at, :datetime
end

class SimpleNestedDoc < CouchbaseOrm::NestedDocument
  attribute :sub_title
  attribute :created_at, :datetime
  attribute :updated_at, :datetime
end

class DocWithBothTimestampsAttributesAndNested < CouchbaseOrm::Base
  attribute :title
  attribute :created_at, :datetime
  attribute :updated_at, :datetime
  attribute :sub, :nested, type: SimpleNestedDoc
  attribute :subs, :array, type: SimpleNestedDoc
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
couchbase-orm-2.0.4 spec/couchbase-orm/timestamps_spec_models.rb
couchbase-orm-2.0.3 spec/couchbase-orm/timestamps_spec_models.rb
couchbase-orm-2.0.2 spec/couchbase-orm/timestamps_spec_models.rb
couchbase-orm-2.0.1 spec/couchbase-orm/timestamps_spec_models.rb
couchbase-orm-2.0.0 spec/couchbase-orm/timestamps_spec_models.rb