Sha256: fa45f167915dc5ef4473659a844b22043296cc114e85be836699ae90c8554a15

Contents?: true

Size: 868 Bytes

Versions: 1

Compression:

Stored size: 868 Bytes

Contents

require 'active_record'

module Wptools
  # +------------------+---------------------+------+-----+---------+-------+
  # | Field            | Type                | Null | Key | Default | Extra |
  # +------------------+---------------------+------+-----+---------+-------+
  # | object_id        | bigint(20) unsigned | NO   | PRI | 0       |       |
  # | term_taxonomy_id | bigint(20) unsigned | NO   | PRI | 0       |       |
  # | term_order       | int(11)             | NO   |     | 0       |       |
  # +------------------+---------------------+------+-----+---------+-------+
  #  object_idとterm_taxonomy_idの組み合わせが主キー
  #
  class WpTermRelationship < ActiveRecord::Base
    self.primary_key = 'term_taxonomy_id'
    belongs_to :wp_post, foreign_key: :object_id
    belongs_to :wp_term_taxonomy, foreign_key: :term_taxonomy_id
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wptools-0.2.0 lib/wptools/wp_term_relationship.rb