예제 #1
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['object_id', 'system_id', 'name'], 'required'], [['data'], 'string'], [['active'], 'integer'], [['created', 'modified'], 'safe'], [['id', 'object_id'], 'string', 'max' => 36], [['system_id', 'name'], 'string', 'max' => 255], [['object_id'], 'exist', 'skipOnError' => true, 'targetClass' => Registry::className(), 'targetAttribute' => ['object_id' => 'id']]];
 }
예제 #2
0
파일: Note.php 프로젝트: psesd/sensor-hub
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getObject()
 {
     return $this->hasOne(Registry::className(), ['id' => 'object_id']);
 }