File: //proc/self/cwd/finance/source/Models/Ecommerce/OrderItens.php
<?php
/**
* Created by PhpStorm.
* User: sergiohidalgojunior
* Date: 2019-09-23
* Time: 18:12
*/
namespace Source\Models\Ecommerce;
use Source\Core\Model;
class OrderItens extends Model
{
public function __construct()
{
parent::__construct("order_itens", ["id"], ["order_id", "date_chq", "item_value", "real_value", "days", "percentual"]);
}
// /**
// * @return null|ProductVariations
// */
// public function variations(): ?ProductVariations
// {
// if ($this->variation_id) {
// return (new ProductVariations())->find("id = :variation_id", "variation_id={$this->variation_id}")->fetch();
// }
// return null;
// }
// /**
// * @return null|Product
// */
// public function product(): ?Product
// {
// if ($this->variation_id) {
// return (new Product())->find("gallery_link = :gl", "gl={$this->variations()->product_id}")->fetch();
// }
// return null;
// }
}