bakaphp    /
                    phalcon-api
                
                            | 1 | <?php  | 
            ||||
| 2 | |||||
| 3 | declare(strict_types=1);  | 
            ||||
| 4 | |||||
| 5 | namespace Gewaer\Models;  | 
            ||||
| 6 | |||||
| 7 | class Resources extends AbstractModel  | 
            ||||
| 8 | { | 
            ||||
| 9 | /**  | 
            ||||
| 10 | *  | 
            ||||
| 11 | * @var integer  | 
            ||||
| 12 | */  | 
            ||||
| 13 | public $id;  | 
            ||||
| 14 | |||||
| 15 | /**  | 
            ||||
| 16 | *  | 
            ||||
| 17 | * @var string  | 
            ||||
| 18 | */  | 
            ||||
| 19 | public $name;  | 
            ||||
| 20 | |||||
| 21 | /**  | 
            ||||
| 22 | *  | 
            ||||
| 23 | * @var string  | 
            ||||
| 24 | */  | 
            ||||
| 25 | public $description;  | 
            ||||
| 26 | |||||
| 27 | /**  | 
            ||||
| 28 | *  | 
            ||||
| 29 | * @var integer  | 
            ||||
| 30 | */  | 
            ||||
| 31 | public $apps_id;  | 
            ||||
| 32 | |||||
| 33 | /**  | 
            ||||
| 34 | *  | 
            ||||
| 35 | * @var string  | 
            ||||
| 36 | */  | 
            ||||
| 37 | public $created_at;  | 
            ||||
| 38 | |||||
| 39 | /**  | 
            ||||
| 40 | *  | 
            ||||
| 41 | * @var string  | 
            ||||
| 42 | */  | 
            ||||
| 43 | public $updated_at;  | 
            ||||
| 44 | |||||
| 45 | /**  | 
            ||||
| 46 | *  | 
            ||||
| 47 | * @var integer  | 
            ||||
| 48 | */  | 
            ||||
| 49 | public $is_deleted;  | 
            ||||
| 50 | |||||
| 51 | /**  | 
            ||||
| 52 | * Initialize method for model.  | 
            ||||
| 53 | */  | 
            ||||
| 54 | 7 | public function initialize()  | 
            |||
| 55 |     { | 
            ||||
| 56 | 7 |         $this->setSource('resources'); | 
            |||
| 57 | |||||
| 58 | 7 | $this->hasMany(  | 
            |||
| 59 | 7 | 'id',  | 
            |||
| 60 | 7 | 'Gewaer\Models\ResourcesAccesses',  | 
            |||
| 61 | 7 | 'resources_id',  | 
            |||
| 62 | [  | 
            ||||
| 63 | 7 | 'alias' => 'accesses',  | 
            |||
| 64 | 'params' => [  | 
            ||||
| 65 | 7 | 'conditions' => 'apps_id = ' . $this->di->getApp()->getId()  | 
            |||
| 
                                                                                                                                                        
                         0 ignored issues 
                            –
                            show
                                    Bug
            Best Practice
    
    
    
        introduced 
                            by  
        
   Loading history...
                The method  
                    
                                            getApp() does not exist on Phalcon\Mvc\Model\Resultset.
                                                                                   (
                                     Ignorable by Annotation
                                )
                                 If this is a false-positive, you can also ignore this issue in your code via the  
 This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed.   Loading history...
                 | 
                |||||
| 66 | ]  | 
            ||||
| 67 | ]  | 
            ||||
| 68 | );  | 
            ||||
| 69 | 7 | }  | 
            |||
| 70 | |||||
| 71 | /**  | 
            ||||
| 72 | * Returns table name mapped in the model.  | 
            ||||
| 73 | *  | 
            ||||
| 74 | * @return string  | 
            ||||
| 75 | */  | 
            ||||
| 76 | 7 | public function getSource(): string  | 
            |||
| 77 |     { | 
            ||||
| 78 | 7 | return 'resources';  | 
            |||
| 79 | }  | 
            ||||
| 80 | }  | 
            ||||
| 81 |