SubSeller::_construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Copyright © Getnet. All rights reserved.
4
 *
5
 * @author    Bruno Elisei <[email protected]>
6
 * See LICENSE for license details.
7
 */
8
9
/**
10
 * Sub Seller resource model.
11
 */
12
13
namespace Getnet\SubSellerMagento\Model\ResourceModel\Seller;
14
15
class SubSeller extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
16
{
17
    /**
18
     * Resource initialization.
19
     *
20
     * @return void
21
     */
22
    protected function _construct()
23
    {
24
        $this->_setMainTable('getnet_sub_seller');
25
    }
26
27
    /**
28
     * Initialize unique fields.
29
     *
30
     * @return $this
31
     */
32
    protected function _initUniqueFields()
33
    {
34
        $this->_uniqueFields = [
35
            [
36
                'field' => ['legal_document_number'],
37
                'title' => __('Legal Document Number'),
38
            ],
39
            [
40
                'field' => ['code'],
41
                'title' => __('Code'),
42
            ],
43
        ];
44
45
        return $this;
46
    }
47
}
48