Sha256: fb3900ec940b656a5f625317d6647edc8d7f9d26992851a351b5464559051d33
Contents?: true
Size: 892 Bytes
Versions: 3
Compression:
Stored size: 892 Bytes
Contents
require "pact_broker/db" module PactBroker module Domain class Label < Sequel::Model set_primary_key([:name, :pacticipant_id]) 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pact_broker-2.107.1 | lib/pact_broker/domain/label.rb |
pact_broker-2.107.0 | lib/pact_broker/domain/label.rb |
pact_broker-2.107.0.beta.1 | lib/pact_broker/domain/label.rb |