Sha256: 2bb23967514783ee0859a2f4cb70c8aaf93b1d1c2b5ca2be1d10906cbd018037

Contents?: true

Size: 614 Bytes

Versions: 5

Compression:

Stored size: 614 Bytes

Contents

##
# Shipment Item 是装运项。

class Unidom::Shipment::ShipmentItem < Unidom::Shipment::ApplicationRecord

  self.table_name = 'unidom_shipment_items'

  include Unidom::Common::Concerns::ModelExtension

  validates :quantity, presence: true, numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: 1_000_000_000 }

  belongs_to :shipment, class_name:  'Unidom::Shipment::Shipment'
  belongs_to :shipped,  polymorphic: true

  has_many :package_items, class_name: 'Unidom::Shipment::ShipmentPackageItem'

end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Shipment::ShipmentItem'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
unidom-shipment-1.0 app/models/unidom/shipment/shipment_item.rb
unidom-shipment-0.7.8 app/models/unidom/shipment/shipment_item.rb
unidom-shipment-0.7.7 app/models/unidom/shipment/shipment_item.rb
unidom-shipment-0.7.6 app/models/unidom/shipment/shipment_item.rb
unidom-shipment-0.7.5 app/models/unidom/shipment/shipment_item.rb