| Total Complexity | 2 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | class CustomFieldsModules extends AbstractModel |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * |
||
| 10 | * @var integer |
||
| 11 | */ |
||
| 12 | public $id; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * |
||
| 16 | * @var integer |
||
| 17 | */ |
||
| 18 | public $apps_id; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | public $name; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * |
||
| 28 | * @var integer |
||
| 29 | */ |
||
| 30 | public $is_deleted; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * |
||
| 34 | * @var string |
||
| 35 | */ |
||
| 36 | public $created_at; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | public $updated_at; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Initialize method for model. |
||
| 46 | */ |
||
| 47 | public function initialize() |
||
| 48 | { |
||
| 49 | $this->setSource('custom_fields_modules'); |
||
| 50 | |||
| 51 | $this->belongsTo( |
||
| 52 | 'companies_id', |
||
| 53 | 'Canvas\Models\Companies', |
||
| 54 | 'id', |
||
| 55 | ['alias' => 'company'] |
||
| 56 | ); |
||
| 57 | |||
| 58 | $this->hasMany( |
||
| 59 | 'id', |
||
| 60 | 'Canvas\CustomFields\CustomFields', |
||
| 61 | 'custom_fields_modules_id', |
||
| 62 | ['alias' => 'fields'] |
||
| 63 | ); |
||
| 64 | |||
| 65 | // $this->belongsTo( |
||
| 66 | // 'apps_id', |
||
| 67 | // 'Canvas\Models\Apps', |
||
| 68 | // 'id', |
||
| 69 | // ['alias' => 'app'] |
||
| 70 | // ); |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Returns table name mapped in the model. |
||
| 75 | * |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | public function getSource(): string |
||
| 81 | } |
||
| 82 | } |
||
| 83 |