Sha256: d13faaf838ae9e05a7a174de8798409a8a2d08a22091b986f0a53b97620ec2ee

Contents?: true

Size: 826 Bytes

Versions: 12

Compression:

Stored size: 826 Bytes

Contents

##
# Standard 是标准。
# 起草单位:   归口单位:
# 标引依据:国家标准公告2015年第38号
# 补充修订:
# 备注:
# 范围:
# Revised by: ISO/NP 9004
# Revises: ISO 9004:2000

class Unidom::Standard::Standard < Unidom::Standard::ApplicationRecord

  self.table_name = 'unidom_standards'

  include Unidom::Common::Concerns::ModelExtension
  include Unidom::Standard::Concerns::AsSourceStandard
  include Unidom::Standard::Concerns::AsTargetStandard

  validates :name,   presence: true, length: { in: 2..self.columns_hash['name'].limit   }
  validates :number, presence: true, length: { in: 2..self.columns_hash['number'].limit }, uniqueness: true

  scope :number_is, ->(number) { where number: number }

end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Standard::Standard'

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
unidom-standard-2.0 app/models/unidom/standard/standard.rb
unidom-standard-1.4.9 app/models/unidom/standard/standard.rb
unidom-standard-1.4.8 app/models/unidom/standard/standard.rb
unidom-standard-1.4.7 app/models/unidom/standard/standard.rb
unidom-standard-1.4.6 app/models/unidom/standard/standard.rb
unidom-standard-1.4.5 app/models/unidom/standard/standard.rb
unidom-standard-1.4.4 app/models/unidom/standard/standard.rb
unidom-standard-1.4.3 app/models/unidom/standard/standard.rb
unidom-standard-1.4.2 app/models/unidom/standard/standard.rb
unidom-standard-1.4.1 app/models/unidom/standard/standard.rb
unidom-standard-1.4 app/models/unidom/standard/standard.rb
unidom-standard-1.3.6 app/models/unidom/standard/standard.rb