| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class FilesSource extends ActiveRecord |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @inheritdoc |
||
| 25 | */ |
||
| 26 | public static function tableName() |
||
| 27 | { |
||
| 28 | return 'import_files_sources'; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @inheritdoc |
||
| 33 | */ |
||
| 34 | public function rules() |
||
| 35 | { |
||
| 36 | return ArrayHelper::merge(parent::rules(), [ |
||
| 37 | [['created', 'updated'], 'safe'], |
||
| 38 | [['name', 'key'], 'required'], |
||
| 39 | [['name', 'key'], 'string', 'max' => 255], |
||
| 40 | ]); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return \yii\db\ActiveQuery |
||
| 45 | */ |
||
| 46 | public function getFiles() |
||
| 47 | { |
||
| 48 | return $this->hasMany(\execut\import\models\File::class, ['import_files_source_id' => 'id'])->inverseOf('filesSource'); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return \yii\db\ActiveQuery |
||
| 53 | */ |
||
| 54 | public function getSettings() |
||
| 57 | } |
||
| 58 | } |
||
| 59 |