1: | <?php
|
2: | namespace Opencart\Catalog\Model\Account;
|
3: | |
4: | |
5: | |
6: | |
7: |
|
8: | class Approval extends \Opencart\System\Engine\Model {
|
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: |
|
17: | public function addApproval(int $customer_id, string $type): void {
|
18: | $this->db->query("INSERT INTO `" . DB_PREFIX . "customer_approval` SET `customer_id` = '" . (int)$customer_id . "', `type` = '" . $this->db->escape($type) . "', `date_added` = NOW()");
|
19: | }
|
20: |
|
21: | |
22: | |
23: | |
24: | |
25: | |
26: | |
27: |
|
28: | public function deleteApprovals(int $customer_id): void {
|
29: | $this->db->query("DELETE FROM `" . DB_PREFIX . "customer_approval` WHERE `customer_id` = '" . (int)$customer_id . "'");
|
30: | }
|
31: | }
|
32: | |