Sha256: d88bc03478a3d0f6070a4e1b07d4c70cd5175a74d9fc5b81c1e57c566b32ca6a

Contents?: true

Size: 719 Bytes

Versions: 1

Compression:

Stored size: 719 Bytes

Contents

# Product 是产品。

class Unidom::Product::Product < ActiveRecord::Base

  self.table_name = 'unidom_products'

  include Unidom::Common::Concerns::ModelExtension
  include Unidom::Product::Concerns::AsSourceProduct
  include Unidom::Product::Concerns::AsTargetProduct

  validates :name,             presence: true, length: { in: 2..self.columns_hash['name'].limit             }
  validates :abbreviation,     presence: true, length: { in: 1..self.columns_hash['abbreviation'].limit     }
  validates :measurement_unit, presence: true, length: { in: 1..self.columns_hash['measurement_unit'].limit }
  validates :packing_norm,     presence: true, length: { in: 1..self.columns_hash['packing_norm'].limit     }

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-product-1.4 app/models/unidom/product/product.rb