Sha256: 8facbb8fee196605e0f54f3efd9f5a42765041db604cef1b21339e5a4995c383

Contents?: true

Size: 405 Bytes

Versions: 1

Compression:

Stored size: 405 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 }

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-shipment-0.1 app/models/unidom/shipment/shipment_item.rb