module Logistics module Core class BreakBulkTruckAssignment < ApplicationRecord validates :truck_type, uniqueness: true, presence: true has_many :truck_type_bb_weight_ranges def self.fetch_all result = [] break_bulk_truck_assignments = BreakBulkTruckAssignment.all BreakBulkTruckAssignment.all.each do |break_bulk_truck_assignment| result.push({id: break_bulk_truck_assignment.id, truck_type: break_bulk_truck_assignment.truck_type}) end return result end end end end