Sha256: c831cabe0476033991d0661725c70ef49496b91840cfc20799d3164057a1c852

Contents?: true

Size: 735 Bytes

Versions: 4

Compression:

Stored size: 735 Bytes

Contents

# Product 是产品。

class Unidom::Product::Product < Unidom::Product::ApplicationRecord

  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

4 entries across 4 versions & 1 rubygems

Version Path
unidom-product-1.5.1 app/models/unidom/product/product.rb
unidom-product-1.5 app/models/unidom/product/product.rb
unidom-product-1.4.2 app/models/unidom/product/product.rb
unidom-product-1.4.1 app/models/unidom/product/product.rb