Sha256: 49ce5c181800689ad8c08552134873dd47baeb3b5240785241956f51ef5d0141

Contents?: true

Size: 984 Bytes

Versions: 1

Compression:

Stored size: 984 Bytes

Contents

module Wptools
  # +------------+---------------------+------+-----+---------+----------------+
  # | Field      | Type                | Null | Key | Default | Extra          |
  # +------------+---------------------+------+-----+---------+----------------+
  # | term_id    | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
  # | name       | varchar(200)        | NO   | MUL |         |                |
  # | slug       | varchar(200)        | NO   | UNI |         |                |
  # | term_group | bigint(10)          | NO   |     | 0       |                |
  # +------------+---------------------+------+-----+---------+----------------+
  #
  # タグやカテゴリーの情報が保存されている
  #
  class WpTerm < ActiveRecord::Base
    self.primary_key = 'term_id'
    has_one :wp_term_taxonomy, foreign_key: :term_id
    has_many :wp_term_relationships, through: :wp_term_taxonomy
    has_many :wp_posts, through: :wp_term_relationships
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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