Sha256: a60702d5732b4804f14c269f9332ef649b151c522f1cd0c05532f29b7690596c

Contents?: true

Size: 507 Bytes

Versions: 2

Compression:

Stored size: 507 Bytes

Contents

# Marking 是条码和物品的标记关系。

class Unidom::ArticleNumber::Marking < ActiveRecord::Base

  self.table_name = 'unidom_markings'

  belongs_to :barcode, polymorphic: true
  belongs_to :marked,  polymorphic: true
  belongs_to :marker,  polymorphic: true

  scope :barcode_is, ->(barcode) { where barcode: barcode }
  scope :marked_by,  ->(marker)  { where marker:  marker  }
  scope :marked_is,  ->(marked)  { where marked:  marked  }

  include Unidom::Common::Concerns::ModelExtension

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
unidom-article_number-0.3 app/models/unidom/article_number/marking.rb
unidom-article_number-0.2 app/models/unidom/article_number/marking.rb