Sha256: 1f2fa7af9eb90cec03f6703a3a35684e4b8b97a86b0f5fb3e6809ce4f6dec29c

Contents?: true

Size: 845 Bytes

Versions: 78

Compression:

Stored size: 845 Bytes

Contents

require 'pact_broker/db'

module PactBroker
  module Domain
    class Label < Sequel::Model

      unrestrict_primary_key

      associate(:many_to_one, :pacticipant, :class => "PactBroker::Domain::Pacticipant", :key => :pacticipant_id, :primary_key => :id)

      def <=> other
        name <=> other.name
      end

    end

    Label.plugin :timestamps, update_on_create: true
  end
end

# Table: labels
# Primary Key: (name, pacticipant_id)
# Columns:
#  name           | text                        |
#  pacticipant_id | integer                     |
#  created_at     | timestamp without time zone | NOT NULL
#  updated_at     | timestamp without time zone | NOT NULL
# Indexes:
#  labels_pk | PRIMARY KEY btree (pacticipant_id, name)
# Foreign key constraints:
#  labels_pacticipant_id_fkey | (pacticipant_id) REFERENCES pacticipants(id)

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/domain/label.rb
pact_broker-2.79.0 lib/pact_broker/domain/label.rb
pact_broker-2.78.1 lib/pact_broker/domain/label.rb
pact_broker-2.78.0 lib/pact_broker/domain/label.rb
pact_broker-2.77.0 lib/pact_broker/domain/label.rb
pact_broker-2.76.2 lib/pact_broker/domain/label.rb
pact_broker-2.76.1 lib/pact_broker/domain/label.rb
pact_broker-2.76.0 lib/pact_broker/domain/label.rb
pact_broker-2.75.0 lib/pact_broker/domain/label.rb
pact_broker-2.74.1 lib/pact_broker/domain/label.rb
pact_broker-2.74.0 lib/pact_broker/domain/label.rb
pact_broker-2.73.0 lib/pact_broker/domain/label.rb
pact_broker-2.72.0 lib/pact_broker/domain/label.rb
pact_broker-2.71.0 lib/pact_broker/domain/label.rb
pact_broker-2.70.0 lib/pact_broker/domain/label.rb
pact_broker-2.69.0 lib/pact_broker/domain/label.rb
pact_broker-2.68.1 lib/pact_broker/domain/label.rb
pact_broker-2.68.0 lib/pact_broker/domain/label.rb
pact_broker-2.67.0 lib/pact_broker/domain/label.rb
pact_broker-2.66.0 lib/pact_broker/domain/label.rb