generated: '2026-10-14' method: derived generator: derive-data-model.py source: - openapi/byrd-apis-openapi.yml notation: has_one = property $ref; has_many = array of $ref; belongs_to = _id field summary: entities: 145 entities_in_spec: 145 relationships: 265 entities: - name: AcceptanceFee fields: 3 - name: Address fields: 15 - name: B2BConfig fields: 8 - name: B2BConfigDetail fields: 2 - name: B2BConfigTemplate fields: 9 - name: Barcode fields: 3 - name: Bundle fields: 6 - name: Carrier fields: 17 - name: CarrierShippingRate fields: 3 - name: CashOnDelivery fields: 1 - name: CashOnDeliveryPrice fields: 3 - name: Checkpoints fields: 11 - name: Child fields: 12 - name: Customer fields: 2 - name: Customs fields: 4 - name: DGDetails fields: 1 - name: DangerousGoodsLimits fields: 1 - name: DecarbonizationSurcharge fields: 4 - name: Delivery fields: 56 - name: DeliveryAddress fields: 16 - name: DeliveryBase fields: 35 - name: DeliveryContainer fields: 13 - name: DeliveryCount fields: 1 - name: DeliveryCreate fields: 57 - name: DeliveryCreateRequest fields: 57 - name: DeliveryDocument fields: 10 - name: DeliveryDocumentInput fields: 9 - name: DeliveryDocumentUpdate fields: 8 - name: DeliveryItem fields: 13 - name: DeliveryItemProduct fields: 11 - name: DeliveryReceivedLot fields: 6 - name: DeliveryReplaceRequest fields: 36 - name: DeliveryStandard fields: 6 - name: DeliveryWithMetrics fields: 63 - name: Dimensions fields: 4 - name: Document fields: 13 - name: DocumentCreate fields: 9 - name: Error fields: 3 - name: FuelSurcharge fields: 4 - name: InboundingDeadline fields: 5 - name: Insurance fields: 2 - name: IslandSurcharge fields: 4 - name: Item fields: 21 - name: ItemBase fields: 17 - name: ItemBaseDangerousGoods fields: 3 - name: ItemCustoms fields: 2 - name: ItemInput fields: 13 - name: ItemsAnnounced fields: 6 - name: LoginPayload fields: 14 - name: LoginResponse fields: 2 - name: Lot fields: 12 - name: LotIncludedInProduct fields: 9 - name: LotUpdate fields: 12 - name: LotWarehouseDetails fields: 3 - name: LotWarehouseDetailsWarehouse fields: 6 - name: Metrics fields: 6 - name: MinimalPaginationFields fields: 3 - name: Notes fields: 2 - name: PackagingMaterials fields: 8 - name: PackagingMaterialsInput fields: 10 - name: PaginationFields fields: 4 - name: PddpSurcharge fields: 4 - name: PeakSurcharge fields: 4 - name: Pick fields: 11 - name: PickPackagingUnit fields: 4 - name: PickProduct fields: 9 - name: PickStorage fields: 7 - name: PickStorageLot fields: 3 - name: PostLogin fields: 3 - name: PostRefreshToken fields: 1 - name: Product fields: 55 - name: ProductBarcode fields: 3 - name: ProductChangeRequest fields: 5 - name: ProductDangerousGoods fields: 11 - name: ProductPackagingUnit fields: 6 - name: ProductStats fields: 6 - name: ProductStockByWarehouse fields: 7 - name: ProductStorage fields: 19 - name: ProductStorageLot fields: 6 - name: RemoteAreaSurcharge fields: 4 - name: Reservation fields: 8 - name: ReservationProduct fields: 4 - name: ReturnAddress fields: 9 - name: ReturnShipment fields: 31 - name: ReturnShipmentAnnounced fields: 14 - name: ReturnShipmentAnnouncedDocument fields: 5 - name: ReturnShipmentAnnouncedInput fields: 10 - name: ReturnShipmentDocument fields: 5 - name: ReturnShipmentError fields: 2 - name: ReturnShipmentItem fields: 11 - name: ReturnShipmentItemAnnounced fields: 6 - name: ReturnShipmentItemAnnouncedInput fields: 3 - name: ReturnShipmentItemPhoto fields: 4 - name: ReturnShipmentRegenerateDocumentsInput fields: 2 - name: ReturnShipmentUnit fields: 4 - name: ReturnedShipment fields: 79 - name: ReturnedShipmentUser fields: 8 - name: SchedulePickup fields: 9 - name: SerialNumberInventory fields: 7 - name: Shipment fields: 35 - name: ShipmentBatch fields: 1 - name: ShipmentBatchRelease fields: 2 - name: ShipmentCount fields: 2 - name: ShipmentDestinationAddress fields: 15 - name: ShipmentDocument fields: 11 - name: ShipmentInput fields: 14 - name: ShipmentInputShop fields: 5 - name: ShipmentItem fields: 20 - name: ShipmentItemDangerousGoods fields: 2 - name: ShipmentList fields: 35 - name: ShipmentListMetrics fields: 6 - name: ShipmentListOptions fields: 27 - name: ShipmentListUnit fields: 20 - name: ShipmentRecall fields: 5 - name: ShipmentShop fields: 6 - name: ShipmentUnit fields: 18 - name: ShipmentUnitCheckpoint fields: 4 - name: ShipmentUnitCount fields: 2 - name: ShipmentUnitDetail fields: 20 - name: ShipmentUnitDetailCheckpoint fields: 8 - name: ShipmentUnitDetailError fields: 7 - name: ShipmentUnitList fields: 26 - name: ShipmentUnitListWarehouse fields: 2 - name: ShipmentUpdate fields: 14 - name: ShipmentUpdateDestinationAddress fields: 11 - name: ShipmentUpdateDocument fields: 11 - name: ShipmentUpdateOptions fields: 8 - name: ShipmentUpdateShop fields: 6 - name: ShipmentUser fields: 5 - name: ShipmentWarehouse fields: 3 - name: StorageProduct fields: 14 - name: StorageWarehouse fields: 2 - name: StorageZone fields: 2 - name: Template fields: 6 - name: TotalPrice fields: 3 - name: UndefinedResponse fields: 1 description: Generic (expected) response when endpoint doesn't explicitly define one - name: UnitDimensions fields: 4 - name: UnitItem fields: 7 - name: UnitMetrics fields: 10 - name: UnitProduct fields: 5 - name: User fields: 50 - name: UserLocality fields: 1 - name: UserUpdate fields: 50 - name: UserWarehouseLink fields: 7 - name: Warehouse fields: 11 relationships: - from: LoginResponse to: LoginPayload type: has_one via: payload - from: User to: Address type: has_one via: billingAddress - from: User to: UserLocality type: has_many via: localities - from: User to: TotalPrice type: has_one via: credit - from: UserUpdate to: Address type: has_one via: billingAddress - from: UserUpdate to: UserLocality type: has_many via: localities - from: UserUpdate to: TotalPrice type: has_one via: credit - from: Bundle to: Product type: has_one via: ingredient - from: LotIncludedInProduct to: Product type: belongs_to via: productID - from: Product to: Barcode type: has_many via: barcodes - from: Product to: Bundle type: has_many via: bundleIngredients - from: Product to: User type: belongs_to via: userID - from: Product to: ProductStorage type: has_many via: storages - from: Product to: LotIncludedInProduct type: has_many via: lots - from: Product to: ProductPackagingUnit type: has_many via: packagingUnits - from: Product to: ProductDangerousGoods type: has_many via: dangerousGoods - from: Product to: ProductChangeRequest type: has_many via: changeRequests - from: ProductDangerousGoods to: Product type: belongs_to via: productID - from: ProductStorage to: StorageProduct type: has_one via: product - from: ProductStorage to: StorageWarehouse type: has_one via: warehouse - from: ProductStorage to: ProductStorageLot type: has_one via: lot - from: StorageProduct to: Barcode type: has_many via: barcodes - from: StorageProduct to: ProductPackagingUnit type: has_many via: packagingUnits - from: ProductStockByWarehouse to: Warehouse type: has_one via: warehouse - from: Warehouse to: DeliveryAddress type: has_one via: deliveryAddress - from: SerialNumberInventory to: Warehouse type: belongs_to via: warehouseID - from: SerialNumberInventory to: Product type: belongs_to via: productID - from: Lot to: Product type: belongs_to via: productID - from: Lot to: LotWarehouseDetails type: has_many via: warehouses - from: LotWarehouseDetails to: LotWarehouseDetailsWarehouse type: has_one via: warehouse - from: LotUpdate to: Product type: belongs_to via: productID - from: LotUpdate to: LotWarehouseDetails type: has_many via: warehouses - from: DeliveryItem to: DeliveryItemProduct type: has_one via: product - from: DeliveryItem to: Product type: belongs_to via: productID - from: DeliveryItemProduct to: Barcode type: has_many via: barcodes - from: DeliveryStandard to: Delivery type: belongs_to via: deliveryID - from: DeliveryWithMetrics to: DeliveryContainer type: has_many via: deliveryContainers - from: DeliveryWithMetrics to: Warehouse type: belongs_to via: warehouseID - from: DeliveryWithMetrics to: StorageWarehouse type: has_one via: warehouse - from: DeliveryWithMetrics to: DeliveryStandard type: has_many via: deliveryStandards - from: DeliveryWithMetrics to: AcceptanceFee type: has_one via: acceptanceFee - from: DeliveryWithMetrics to: AcceptanceFee type: has_one via: customsPaid - from: DeliveryWithMetrics to: AcceptanceFee type: has_one via: deliveryCostsPaid - from: DeliveryWithMetrics to: AcceptanceFee type: has_one via: putawayFee - from: DeliveryWithMetrics to: User type: belongs_to via: userID - from: DeliveryWithMetrics to: DeliveryItem type: has_many via: deliveryItems - from: DeliveryWithMetrics to: InboundingDeadline type: has_one via: inboundingDeadline - from: DeliveryCreate to: DeliveryContainer type: has_many via: deliveryContainers - from: DeliveryCreate to: Warehouse type: belongs_to via: warehouseID - from: DeliveryCreate to: StorageWarehouse type: has_one via: warehouse - from: DeliveryCreate to: DeliveryStandard type: has_many via: deliveryStandards - from: DeliveryCreate to: AcceptanceFee type: has_one via: acceptanceFee - from: DeliveryCreate to: AcceptanceFee type: has_one via: customsPaid - from: DeliveryCreate to: AcceptanceFee type: has_one via: deliveryCostsPaid - from: DeliveryCreate to: AcceptanceFee type: has_one via: putawayFee - from: DeliveryCreate to: User type: belongs_to via: userID - from: DeliveryCreate to: DeliveryItem type: has_many via: deliveryItems - from: DeliveryCreate to: InboundingDeadline type: has_one via: inboundingDeadline - from: DeliveryCreate to: DocumentCreate type: has_many via: documents - from: DeliveryCreateRequest to: DeliveryContainer type: has_many via: deliveryContainers - from: DeliveryCreateRequest to: Warehouse type: belongs_to via: warehouseID - from: DeliveryCreateRequest to: StorageWarehouse type: has_one via: warehouse - from: DeliveryCreateRequest to: DeliveryStandard type: has_many via: deliveryStandards - from: DeliveryCreateRequest to: AcceptanceFee type: has_one via: acceptanceFee - from: DeliveryCreateRequest to: AcceptanceFee type: has_one via: customsPaid - from: DeliveryCreateRequest to: AcceptanceFee type: has_one via: deliveryCostsPaid - from: DeliveryCreateRequest to: AcceptanceFee type: has_one via: putawayFee - from: DeliveryCreateRequest to: User type: belongs_to via: userID - from: DeliveryCreateRequest to: DeliveryItem type: has_many via: deliveryItems - from: DeliveryCreateRequest to: InboundingDeadline type: has_one via: inboundingDeadline - from: DeliveryCreateRequest to: DocumentCreate type: has_many via: documents - from: DocumentCreate to: User type: belongs_to via: userID - from: Delivery to: DeliveryContainer type: has_many via: deliveryContainers - from: Delivery to: Warehouse type: belongs_to via: warehouseID - from: Delivery to: StorageWarehouse type: has_one via: warehouse - from: Delivery to: DeliveryStandard type: has_many via: deliveryStandards - from: Delivery to: AcceptanceFee type: has_one via: acceptanceFee - from: Delivery to: AcceptanceFee type: has_one via: customsPaid - from: Delivery to: AcceptanceFee type: has_one via: deliveryCostsPaid - from: Delivery to: AcceptanceFee type: has_one via: putawayFee - from: Delivery to: User type: belongs_to via: userID - from: Delivery to: DeliveryItem type: has_many via: deliveryItems - from: Delivery to: InboundingDeadline type: has_one via: inboundingDeadline - from: DeliveryReplaceRequest to: DeliveryContainer type: has_many via: deliveryContainers - from: DeliveryReplaceRequest to: Warehouse type: belongs_to via: warehouseID - from: DeliveryReplaceRequest to: StorageWarehouse type: has_one via: warehouse - from: DeliveryReplaceRequest to: DeliveryStandard type: has_many via: deliveryStandards - from: DeliveryReplaceRequest to: DeliveryItem type: has_many via: deliveryItems - from: DeliveryBase to: DeliveryContainer type: has_many via: deliveryContainers - from: DeliveryBase to: Warehouse type: belongs_to via: warehouseID - from: DeliveryBase to: StorageWarehouse type: has_one via: warehouse - from: DeliveryBase to: DeliveryStandard type: has_many via: deliveryStandards - from: DeliveryReceivedLot to: Product type: belongs_to via: productID - from: DeliveryReceivedLot to: Lot type: belongs_to via: lotID - from: DeliveryDocument to: Delivery type: belongs_to via: deliveryID - from: DeliveryDocument to: User type: belongs_to via: userID - from: DeliveryDocumentInput to: Delivery type: belongs_to via: deliveryID - from: DeliveryDocumentUpdate to: Delivery type: belongs_to via: deliveryID - from: DeliveryDocumentUpdate to: User type: belongs_to via: userID - from: B2BConfig to: Template type: belongs_to via: template_id - from: Carrier to: Shipment type: belongs_to via: shipment_id - from: Carrier to: CarrierShippingRate type: has_one via: shipping_rate - from: Carrier to: CarrierShippingRate type: has_one via: byrd_shipping_rate - from: Carrier to: FuelSurcharge type: has_one via: fuel_surcharge_rate - from: Carrier to: PeakSurcharge type: has_one via: peak_surcharge_rate - from: Carrier to: DecarbonizationSurcharge type: has_one via: decarbonization_surcharge_rate - from: Carrier to: PddpSurcharge type: has_one via: pddp_surcharge_rate - from: Carrier to: RemoteAreaSurcharge type: has_one via: remote_area_surcharge_rate - from: Carrier to: IslandSurcharge type: has_one via: island_surcharge_rate - from: CashOnDelivery to: CashOnDeliveryPrice type: has_one via: price - from: Item to: Product type: belongs_to via: product_id - from: Item to: CarrierShippingRate type: has_one via: price - from: Item to: Dimensions type: has_one via: dimensions - from: Item to: ItemCustoms type: has_one via: customs - from: Item to: ItemBaseDangerousGoods type: has_many via: dangerous_goods - from: Item to: ItemBase type: has_one via: children - from: ItemBase to: Product type: belongs_to via: product_id - from: ItemBase to: CarrierShippingRate type: has_one via: price - from: ItemBase to: Dimensions type: has_one via: dimensions - from: ItemBase to: ItemCustoms type: has_one via: customs - from: ItemBase to: ItemBaseDangerousGoods type: has_many via: dangerous_goods - from: ShipmentList to: B2BConfig type: has_one via: b2b_config - from: ShipmentList to: Checkpoints type: has_one via: checkpoints - from: ShipmentList to: Customs type: has_one via: customs - from: ShipmentList to: ShipmentDestinationAddress type: has_one via: destination_address - from: ShipmentList to: ShipmentUnitDetailError type: has_many via: errors - from: ShipmentList to: Insurance type: has_one via: insurance - from: ShipmentList to: ShipmentListMetrics type: has_one via: metrics - from: ShipmentList to: Notes type: has_one via: notes - from: ShipmentList to: ShipmentListOptions type: has_one via: options - from: ShipmentList to: ReturnAddress type: has_one via: return_address - from: ShipmentList to: ShipmentShop type: has_one via: shop - from: ShipmentList to: ShipmentListUnit type: has_many via: units - from: ShipmentList to: ShipmentUnitDetailError type: has_many via: warnings - from: ShipmentList to: ShipmentWarehouse type: has_one via: warehouse - from: ShipmentList to: ShipmentUser type: has_one via: user - from: ShipmentList to: DGDetails type: has_one via: dangerous_goods - from: ShipmentList to: CashOnDelivery type: has_one via: cash_on_delivery - from: ShipmentList to: CashOnDeliveryPrice type: has_one via: total_value - from: ShipmentList to: PackagingMaterials type: has_many via: packaging_materials - from: ShipmentList to: User type: belongs_to via: user_id - from: ShipmentList to: Document type: has_many via: documents - from: ShipmentList to: Warehouse type: belongs_to via: warehouse_id - from: ShipmentList to: Item type: has_many via: items - from: ShipmentListUnit to: UnitItem type: has_many via: items - from: ShipmentListUnit to: Carrier type: has_one via: carrier - from: ShipmentListUnit to: ShipmentUnitCheckpoint type: has_one via: checkpoints - from: ShipmentListUnit to: ShipmentUnitDetailError type: has_many via: errors - from: ShipmentListUnit to: UnitDimensions type: has_one via: dimensions - from: ShipmentListUnit to: PackagingMaterials type: has_many via: packaging_materials - from: ShipmentListUnit to: UnitMetrics type: has_one via: metrics - from: UnitItem to: UnitProduct type: has_one via: product - from: UnitItem to: Product type: belongs_to via: product_id - from: UnitProduct to: ProductBarcode type: has_many via: barcodes - from: Child to: Product type: belongs_to via: product_id - from: ItemInput to: Product type: belongs_to via: product_id - from: ItemInput to: Child type: has_many via: children - from: Shipment to: B2BConfig type: has_one via: b2b_config - from: Shipment to: Checkpoints type: has_one via: checkpoints - from: Shipment to: Customs type: has_one via: customs - from: Shipment to: ShipmentDestinationAddress type: has_one via: destination_address - from: Shipment to: ShipmentUnitDetailError type: has_many via: errors - from: Shipment to: Insurance type: has_one via: insurance - from: Shipment to: Metrics type: has_one via: metrics - from: Shipment to: Notes type: has_one via: notes - from: Shipment to: ReturnAddress type: has_one via: return_address - from: Shipment to: ShipmentShop type: has_one via: shop - from: Shipment to: ShipmentUnitDetail type: has_many via: units - from: Shipment to: ShipmentUnitDetailError type: has_many via: warnings - from: Shipment to: ShipmentWarehouse type: has_one via: warehouse - from: Shipment to: ShipmentUser type: has_one via: user - from: Shipment to: DGDetails type: has_one via: dangerous_goods - from: Shipment to: CashOnDelivery type: has_one via: cash_on_delivery - from: Shipment to: CashOnDeliveryPrice type: has_one via: total_value - from: Shipment to: PackagingMaterials type: has_many via: packaging_materials - from: Shipment to: User type: belongs_to via: user_id - from: Shipment to: Document type: has_many via: documents - from: Shipment to: Warehouse type: belongs_to via: warehouse_id - from: Shipment to: Item type: has_many via: items - from: ShipmentInput to: ShipmentUpdateDestinationAddress type: has_one via: destination_address - from: ShipmentInput to: ShipmentUpdateDocument type: has_many via: documents - from: ShipmentInput to: ItemInput type: has_many via: items - from: ShipmentInput to: ShipmentUpdateOptions type: has_one via: options - from: ShipmentInput to: ShipmentInputShop type: has_one via: shop - from: ShipmentInput to: User type: belongs_to via: user_id - from: ShipmentInput to: Warehouse type: belongs_to via: warehouse_id - from: ShipmentInput to: PackagingMaterialsInput type: has_many via: packaging_materials - from: ShipmentUnitDetail to: UnitItem type: has_many via: items - from: ShipmentUnitDetail to: Carrier type: has_one via: carrier - from: ShipmentUnitDetail to: ShipmentUnitDetailCheckpoint type: has_one via: checkpoints - from: ShipmentUnitDetail to: ShipmentUnitDetailError type: has_many via: errors - from: ShipmentUnitDetail to: UnitDimensions type: has_one via: dimensions - from: ShipmentUnitDetail to: PackagingMaterials type: has_many via: packaging_materials - from: ShipmentUnitDetail to: UnitMetrics type: has_one via: metrics - from: ShipmentUpdate to: ShipmentUpdateDestinationAddress type: has_one via: destination_address - from: ShipmentUpdate to: ShipmentUpdateDocument type: has_many via: documents - from: ShipmentUpdate to: ItemInput type: has_many via: items - from: ShipmentUpdate to: ShipmentUpdateOptions type: has_one via: options - from: ShipmentUpdate to: ShipmentUpdateShop type: has_one via: shop - from: ShipmentUpdate to: User type: belongs_to via: user_id - from: ShipmentUpdate to: Warehouse type: belongs_to via: warehouse_id - from: ShipmentUpdate to: PackagingMaterialsInput type: has_many via: packaging_materials - from: ShipmentBatchRelease to: Shipment type: belongs_to via: shipment_ids - from: ShipmentBatchRelease to: Warehouse type: belongs_to via: warehouse_id - from: ShipmentBatch to: Shipment type: belongs_to via: shipment_ids - from: ShipmentUnitList to: UnitItem type: has_many via: items - from: ShipmentUnitList to: Carrier type: has_one via: carrier - from: ShipmentUnitList to: ShipmentUnitCheckpoint type: has_one via: checkpoints - from: ShipmentUnitList to: ShipmentUnitDetailError type: has_many via: errors - from: ShipmentUnitList to: UnitDimensions type: has_one via: dimensions - from: ShipmentUnitList to: PackagingMaterials type: has_many via: packaging_materials - from: ShipmentUnitList to: Shipment type: belongs_to via: shipment_id - from: ShipmentUnitList to: ShipmentUnitListWarehouse type: has_one via: warehouse - from: ShipmentUnitList to: Customer type: has_one via: customer - from: ShipmentUnitList to: UnitMetrics type: has_one via: metrics - from: ShipmentUnit to: UnitItem type: has_many via: items - from: ShipmentUnit to: Carrier type: has_one via: carrier - from: ShipmentUnit to: ShipmentUnitCheckpoint type: has_one via: checkpoints - from: ShipmentUnit to: ShipmentUnitDetailError type: has_many via: errors - from: ShipmentUnit to: UnitDimensions type: has_one via: dimensions - from: ShipmentUnit to: PackagingMaterials type: has_many via: packaging_materials - from: Pick to: PickStorage type: has_one via: storage - from: Pick to: PickProduct type: has_one via: product - from: Pick to: PickPackagingUnit type: has_one via: packaging_unit - from: Pick to: Shipment type: belongs_to via: shipment_id - from: Pick to: Warehouse type: belongs_to via: warehouse_id - from: Pick to: StorageZone type: has_many via: zones - from: PickProduct to: ProductBarcode type: has_many via: barcodes - from: PickStorage to: PickStorageLot type: has_one via: lot - from: Reservation to: Lot type: belongs_to via: lot_id - from: Reservation to: ReservationProduct type: has_one via: product - from: Reservation to: Shipment type: belongs_to via: shipment_id - from: Reservation to: Warehouse type: belongs_to via: warehouse_id - from: ReturnShipment to: ReturnedShipment type: has_one via: shipment - from: ReturnShipment to: Shipment type: belongs_to via: shipmentID - from: ReturnShipment to: ReturnShipmentUnit type: has_one via: unit - from: ReturnShipment to: TotalPrice type: has_one via: courierFee - from: ReturnShipment to: ReturnShipmentItem type: has_many via: items - from: ReturnShipment to: ReturnShipmentItemAnnounced type: has_many via: itemsAnnounced - from: ReturnShipment to: ReturnShipmentDocument type: has_many via: documents - from: ReturnShipment to: Warehouse type: belongs_to via: warehouseID - from: ReturnShipment to: ReturnShipmentError type: has_one via: shipmentError - from: ReturnShipmentItem to: ShipmentItem type: belongs_to via: shipmentItemID - from: ReturnShipmentItem to: ReturnShipmentItemPhoto type: has_many via: photos - from: ReturnShipmentItemAnnounced to: ShipmentItem type: belongs_to via: shipmentItemID - from: ReturnedShipment to: Address type: has_one via: destinationAddress - from: ReturnedShipment to: TotalPrice type: has_one via: totalPrice - from: ReturnedShipment to: ReturnedShipmentUser type: has_one via: user - from: ReturnedShipment to: Warehouse type: belongs_to via: warehouseID - from: ReturnedShipment to: ShipmentItem type: has_many via: shipmentItems - from: ReturnedShipment to: ShipmentDocument type: has_many via: documents - from: ShipmentItem to: ShipmentItemDangerousGoods type: has_many via: dangerousGoods - from: ShipmentItem to: Product type: belongs_to via: productID - from: ItemsAnnounced to: ShipmentItem type: belongs_to via: shipment_item_id - from: ReturnShipmentAnnounced to: Shipment type: belongs_to via: shipment_id - from: ReturnShipmentAnnounced to: ItemsAnnounced type: has_many via: items_announced - from: ReturnShipmentAnnounced to: ReturnShipmentAnnouncedDocument type: has_many via: documents - from: ReturnShipmentAnnouncedInput to: Shipment type: belongs_to via: shipment_id - from: ReturnShipmentAnnouncedInput to: User type: belongs_to via: user_id - from: ReturnShipmentAnnouncedInput to: ReturnShipmentItemAnnouncedInput type: has_many via: items_announced - from: ReturnShipmentItemAnnouncedInput to: ShipmentItem type: belongs_to via: shipment_item_id - from: UserWarehouseLink to: User type: belongs_to via: userID - from: UserWarehouseLink to: Warehouse type: belongs_to via: warehouseID - from: UserWarehouseLink to: Warehouse type: has_one via: warehouse - from: B2BConfigDetail to: Template type: has_one via: template