Esempio n. 1
0
 public static function initialize(Config $config)
 {
     ItemGroupTrait::initialize($config);
     TimestampsTrait::initialize($config);
     RandomKeyTrait::initialize($config);
     $config->setTable('StorePurchase')->addRels([new Rel\BelongsTo('purchase', $config, Purchase::getRepo()), new Rel\BelongsTo('store', $config, Store::getRepo()), new Rel\HasMany('items', $config, PurchaseItem::getRepo(), ['inverseOf' => 'storePurchase']), new Rel\HasMany('refunds', $config, Refund::getRepo(), ['inverseOf' => 'storePurchase'])]);
 }
Esempio n. 2
0
 public static function initialize(Config $config)
 {
     TransferTrait::initialize($config);
     ItemGroupTrait::initialize($config);
     TimestampsTrait::initialize($config);
     RandomKeyTrait::initialize($config);
     CurrencyTrait::initialize($config);
     $config->setTable('Purchase')->addRels([new Rel\HasMany('items', $config, PurchaseItem::getRepo(), ['inverseOf' => 'purchase']), new Rel\HasMany('storePurchases', $config, StorePurchase::getRepo(), ['inverseOf' => 'purchase']), new Rel\BelongsTo('billing', $config, Address::getRepo())]);
 }
Esempio n. 3
0
 public static function initialize($config)
 {
     RandomKeyTrait::initialize($config);
 }