OSDN Git Service
(root)
/
invent
/
invent.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Произведено изменение схемы хранения данных. Для моделей создана отдельная таблица...
[invent/invent.git]
/
models
/
Models.php
diff --git
a/models/Models.php
b/models/Models.php
index
38cc2fb
..
1948aa6
100644
(file)
--- a/
models/Models.php
+++ b/
models/Models.php
@@
-65,4
+65,9
@@
class Models extends \yii\db\ActiveRecord
{
return $this->hasOne(Types::className(), ['id' => 'type_id']);
}
+
+ public function getItems()
+ {
+ return $this->hasMany(Items::className(), ['model_id' => 'id']);
+ }
}