File: //proc/self/cwd/finance/source/Models/Ecommerce/Orders.php
<?php
/**
* Created by PhpStorm.
* User: sergiohidalgojunior
* Date: 2019-09-23
* Time: 18:12
*/
namespace Source\Models\Ecommerce;
use Source\Core\Model;
use Source\Models\User;
class Orders extends Model
{
public function __construct()
{
parent::__construct("orders", ["id"], ["title", "starting_date", "percentual"]);
}
//
// public function findByIntegrationOrder(string $integrationOrder, string $columns = "*"): ?Orders
// {
// $find = $this->find("integration_order = :io", "io={$integrationOrder}", $columns);
// return $find->fetch();
// }
// /**
// * @return null|User
// */
// public function user(): ?User
// {
// if ($this->user_id) {
// return (new User())->find("id = :id", "id={$this->user_id}")->fetch();
// }
// return null;
// }
// /**
// * @return null|Coupon
// */
// public function coupon(): ?Coupon
// {
// if ($this->partner_id) {
// return (new Coupon())->find("id = :id", "id={$this->coupon_id}")->fetch();
// }
// return null;
// }
}