/home/sllgo12194/domains/wnm-test.devsel.pl/public_html/modules/shipments/classes/model/shipment.php
<?php
defined('SYSPATH') or exit('No direct script access.');
/**
* @class Model_Shipment
*
* Shipment.
* Tabela: shipments
*
* @property Model_Couriertemplate[] $shipment_couriertemplates
*
* @author Janusz Karnat (shagwest@gmail.com)
*/
class Model_Shipment extends ORM
{
use Traits_Model_VatRates;
public const FRONTEND_KEYS_CACHE = 'shipment_cache_frontend_keys';
public $multilang = ['title', 'text', 'text_email', 'title_internal'];
protected $_has_many = [
'templates' => [
'model' => 'shipmenttemplate',
'through' => 'shipmenttemplate',
'far_key' => 'template_id',
'foreign_key' => 'shipment_id',
],
'couriertemplates' => [
'model' => 'shipmentcouriertemplate',
'through' => 'shipmentcouriertemplates',
'far_key' => 'template_id',
'foreign_key' => 'shipment_id',
],
'shipment_couriertemplates' => [
'model' => 'couriertemplate',
'foreign_key' => 'shipment_id',
],
'payments' => [
'model' => 'payment',
'through' => 'shipmentpayment',